
17 Aug
2015
17 Aug
'15
4:49 a.m.
Hi Debdut, On Mon, Aug 17, 2015 at 04:44:55AM -0400, Debdut Karmakar wrote:
I am a haskell beginner and wondering how the following function works (in procedure) :
oddsFrom3 :: [Integer] oddsFrom3 = 3 : map (+2) oddsFrom3
Thanks for your help.
Try to expand a few steps of the recursion by hand e.g.: 3 : (map (+2) (3 : map (+2) (3 : map (+2) ...))) As you can see, the deeper you go more 'map (+2)' are applied to '3'. Greetings, Daniel