Skip to content

Instantly share code, notes, and snippets.

@msuchecki
Created May 7, 2014 18:05
Show Gist options
  • Save msuchecki/916c949486016e76d22e to your computer and use it in GitHub Desktop.
Save msuchecki/916c949486016e76d22e to your computer and use it in GitHub Desktop.
def fib(n: Int): Int = {
if(n == 0) 0
else if (n == 1) 1
else fib(n-1) + fib(n-2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment