[Q]: collection bitAnd ?
Richard A. O'Keefe
ok at cs.otago.ac.nz
Thu Apr 4 07:51:45 UTC 2002
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: [:x :y| x bitAnd: y]
The result is actually #(1 0 6), if we do
{1. 2. 6} with: {3. 1. 7} collect: [:x :y| x bitOr: y]
the result is #(3 3 7). I don't know how #(3 2 7) (note the absence
of dots) is to be derived.
More information about the Squeak-dev
mailing list
|