Last active
August 29, 2015 14:18
-
-
Save joanmolinas/43172dc3ba4744c5e3de to your computer and use it in GitHub Desktop.
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
func recursiveFibonacci(number : Int) -> Int { | |
return number <= 1 ? 1 : recursiveFibonacci(number - 2) + recursiveFibonacci(number - 1) | |
} | |
var fibonacci : Int -> Int = recursiveFibonacci | |
fibonacci(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment