<div dir="ltr">Hi Felipe,<br>
<br>
very nice simplification. Now I can even recognize the pattern used in the fibonacci number solution.<br>
<br>
Thanks,<br>
Dirk <br><br><div class="gmail_quote">2008/7/21 Felipe Lessa <<a href="mailto:felipe.lessa@gmail.com">felipe.lessa@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Jul 21, 2008 at 11:21 AM, Bernie Pope <<a href="mailto:bjpop@csse.unimelb.edu.au">bjpop@csse.unimelb.edu.au</a>> wrote:<br>
> suffix = 5 : [ x + y | (x,y) <- zip suffix (cycle [2,4])]<br>
> list = 2 : 3 : suffix<br>
<br>
</div>'suffix' can be simplified a bit by using zipWith:<br>
<br>
suffix = 5 : zipWith (+) suffix (cycle [2,4])<br>
<br>
<br>
Thanks,<br>
<br>
--<br>
<font color="#888888">Felipe.<br>
</font></blockquote></div><br></div>