[Q]: collection bitAnd ?

Ned Konz ned at bike-nomad.com
Sun Mar 31 22:23:03 UTC 2002


On Sunday 31 March 2002 02:14 pm, Karl Ramberg wrote:
> How do I do something equal to a bitAnd for a collection?
>
> { 1. 2. 6.} bitAnd:[{ 3. 1. 7.}] --> #(3. 2. 7.)

{ 1. 2. 6.} with: { 3. 1. 7.} collect: [ :a :b | a bitAnd: b ] 
	=> #(1 0 6)

I don't know about your math. Do you mean to bitAnd: each corresponding 
element?

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com



More information about the Squeak-dev mailing list