Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open System
- module MyMod1 =
- type Fib = bigint -> bigint //function signatures!
- let fib:Fib = fun n ->
- let rec loop acc1 acc2 = function
- | n when n = 0I -> acc1
- | n -> loop acc2 (acc1 + acc2) (n - 1I)
- loop 0I 1I n
- Console.WriteLine(MyMod1.fib 6I)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement