
21 Jul
2008
21 Jul
'08
11:55 a.m.
Hi Felipe,
very nice simplification. Now I can even recognize the pattern used in the
fibonacci number solution.
Thanks,
Dirk
2008/7/21 Felipe Lessa
On Mon, Jul 21, 2008 at 11:21 AM, Bernie Pope
wrote: suffix = 5 : [ x + y | (x,y) <- zip suffix (cycle [2,4])] list = 2 : 3 : suffix
'suffix' can be simplified a bit by using zipWith:
suffix = 5 : zipWith (+) suffix (cycle [2,4])
Thanks,
-- Felipe.