Last active
July 10, 2019 18:32
-
-
Save vincent-pradeilles/b005a1ab9fb75ee3a2cc0e79aea82463 to your computer and use it in GitHub Desktop.
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
func fib(_ n: Int) -> Int { | |
if n == 0 || n == 1 { | |
return 1 | |
} else { | |
return fib(n - 1) + fib(n - 2) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment