Explain how this manages to generate all fibonacci numbers.
Sponsor Sponsor
rizzix
Posted: Thu Sep 08, 2005 6:40 pm Post subject: (No subject)
ehm easy... it appends the zip of the sum of the nth and (n+1)th element of the list L=1:1:... to list L, through lazy evaluation.. and you get ur fibonacci sequence
that's one way of looking at it.. truth is.. it lazily evaluates the rest of the list.. nothing is appended.