Skip to content

Instantly share code, notes, and snippets.

@akashkgarg
Created August 31, 2012 18:33
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 akashkgarg/3557028 to your computer and use it in GitHub Desktop.
Save akashkgarg/3557028 to your computer and use it in GitHub Desktop.
Computing the Fibonacci Sequence
fibs :: [Integer]
fibs = 1 : 1 : zipWith myadd fibs (tail fibs)
where myadd x y = trace (" Adding: " ++ show x ++ " & " ++ show y ++ "\n")
(x+y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment