[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LFM + LFSP = LFE?



On Thu 12 Jun 2003 23:29, Avi Bryant wrote:
> On Thu, 12 Jun 2003, Grzegorz [utf-8] Chrupała wrote:
> > Yes. But in a message-passing OO language such as Ruby mapping over
> > multiple arrays simultaneously is just awkward since methods have a
> > single receiver. Thats why I was wondering about Smalltalk.
>
> In Smalltalk you'd use something like
>
> #(1 2 3) with: #(4 5 6) collect: [:a :b | a * b]
>
> I'm not certain if #with:collect: is standard or not - #with:do:
> certainly is.

This handles a parallel map on two arrays. 
Would it be possible to emulate Scheme's

(apply map * big-list-of-lists-of-numbers)

?
-- 
Grzegorz Chrupała
jabber: grzegorzc@jabber.org
website: http://pithekos.net