Marcel Weiher wrote:
On Sunday, September 2, 2001, at 10:19 PM, Lex Spoon wrote:
By the way, there is a nice generalization of the above with:foo: pattern. It looks like this:
(firstArray with: secondArray) collect: [ :combo | combo first + combo
second ]
I have to admit I like
firstArray collect + secondArray each
better, though it is far from perfect, because the structure of the intended is still visible in the lexical structure of the code (LHS + RHS), even if both the LHS and the RHS are a little mucked up.
The best one so far ( I think) is firstArray + secondArray which works like a charm :-) But you still have to know that the arrays have equal size.
Karl