Hello,

I can hardly imagine how the following code works:

cinits :: [a] -> [[a]]
cinits [] = [[]]
cinits (x:xs) = [] : map (x:) (cinits xs)

can someone give me a good explaination?

(I understand it a bit, but it's really hard for me to figure out how a map
in a map function works.)

Thank you for your time,

Tsunkiet
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to