Haskell - function (that returns a list) on each element in a list

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-04-22T20:14:37Z Indexed on 2010/04/23 0:43 UTC
Read the original article Hit count: 288

Filed under:
|
|
|
|

The assignment is to create a multiples function and I essentially want todo the following code:

map (\t -> scanl (\x y -> x+y) t (repeat t)) listofnumbers

The problem is that the scanl function returns a list of results rather than the one which the map function requires.

So is there a function that will allow the return of lists?

© Stack Overflow or respective owner

Related posts about haskell

Related posts about map