Skip to content

Instantly share code, notes, and snippets.

@espio999
Created July 2, 2024 14:34
Show Gist options
  • Save espio999/00f3f0e2e256c794e4d5555682fe04e5 to your computer and use it in GitHub Desktop.
Save espio999/00f3f0e2e256c794e4d5555682fe04e5 to your computer and use it in GitHub Desktop.
F# fibonacci
let rec fib n =
match n with
| 0 | 1 -> n
| n -> fib (n-1) + fib (n-2)
fib 40 |> printfn "%A"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment