[Haskell-cafe] About Fibonacci again...

ajb at spamcop.net ajb at spamcop.net
Thu Nov 8 00:32:12 EST 2007

G'day all.

Quoting jerzy.karczmarczuk at info.unicaen.fr:

> This nasty acquaintance of mine asked the students to write down a simple
> procedure which generates the sequence after the infinite number of units
> of time.

Cool problem!  "Simple" is, of course, in the eye of the beholder.

zipWith (!!) (fix (([1]:).map(>>= \x->if x==0 then [1] else [1,0]))) [0..]

Andrew Bromage

More information about the Haskell-Cafe mailing list