Created
January 25, 2015 00:46
-
-
Save amonshiz/e0c9df6ac2423bf08e70 to your computer and use it in GitHub Desktop.
Basic Fibonacci number implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fib :: Integer -> Integer | |
fib 0 = 0 | |
fib 1 = 1 | |
fib n = fib (n-1) + fib (n-2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment