Skip to content

Instantly share code, notes, and snippets.

@smiler
Created November 14, 2013 13:52
Show Gist options
  • Save smiler/7467107 to your computer and use it in GitHub Desktop.
Save smiler/7467107 to your computer and use it in GitHub Desktop.
let rec fib_aux n a b =
match n with
| 0 -> a
| _ -> fib_aux (n - 1) b (a+b)
let fib n = fib_aux n 0 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment