Facebook
From Sweltering Baboon, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 117
  1. let rec fibonacci x = match x with
  2. | 0 -> 0
  3. | (n < 3) -> print_int(n-1); fibonacci (n-1)
  4. | (n > 3) -> print_int(n); fibonacci (n - 1) + fibonacci (n - 2)
  5. ;;