Created
December 6, 2015 13:14
-
-
Save vlad-bezden/bbfde9b4567d323e9fbf to your computer and use it in GitHub Desktop.
Fibonacci implementation in F#
This file contains 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
let rec fibonacci n = | |
match n with | |
| 1 | 2 -> 1 | |
| _ -> fibonacci (n - 1) + fibonacci (n - 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment