Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created March 18, 2009 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/81221 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/81221 to your computer and use it in GitHub Desktop.
-- Haskell
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
// F#
let rec fibs : LazyList<int> =
LazyList.cons 0 (LazyList.cons 1 (fun() -> (LazyList.map2 (+) fibs (LazyList.tl fibs))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment