Advertisement
rjoseph98

Untitled

Nov 17th, 2018
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.09 KB | None | 0 0
  1. let rec fib (n: int) : int =
  2.   match n with
  3.   |1 -> 1
  4.   |2 -> 1
  5.   |_ -> fib (n-1) + fib (n-2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement