
26 Jan
2005
26 Jan
'05
12:12 p.m.
On Wed, 26 Jan 2005, Luca Marchetti wrote:
Hi
why don't you try something like this:
map (\(x,y) -> x+y) (zip [1,2,100] [2,3,500])
list comprehension would sum every element of the firs list with every element of the second.
If 'zipWith (+)' doesn't satisfy you, what about map (uncurry (+)) (zip [1,2,100] [2,3,500]) ? B-]