Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
6 people like it. Like the snippet!
Fibonacci nth term with fold
1:
let fibonacci n = [|1..n|] |> Array.fold (fun (a,b) _ -> b, a + b) (0,1) |> fst