Lurker News
Preferably an elegant snippet rather than an entire (well engineered) codebase.

Comments (380) 116 threads

Show all comments

Showing thread 71 of 116

ashton3141 reply#
Lazily-generated infinite list of Fibonacci numbers in Haskell:

    fibs = 0:1:zipWith (+) fibs (tail fibs)
Recursive definitions and lazy programming blew my mind.
donaldihunter#
And in Perl6 / Raku

my @fibs = 1, 1, * + * ... ∞