Subject: Re: Q. on Lambda exp.

> 
> Hi, CC,
> 
> I tried this on gofer
> 
> ? map (\x y -> x*y) [2,3,4,5]
> 
> and I got
> 
> [v132 2, v132 3, v132 4, v132 5]
> 
> why not this [120] ?

Because map expects a function of one argument
and you're handing it a function of two
arguments. You (probably) want to use 'foldr'.

/CC 

___________________________________________________________________________
Christian Collberg      | Email: c_collberg@cs.auckland.ac.nz
Computer Science Dept   | Fax:   +64-9-373-7453
University of Auckland  | Phone: +64-9-373-7599 x 6137
Private Bag 92019,      | WWW:   http://www.cs.auckland.ac.nz/~collberg/
Auckland, NZ            |
___________________________________________________________________________
"Education is an admirable thing, but it is well to remember from time
to time that nothing that is worth knowing can be taught." - Oscar Wilde
___________________________________________________________________________