Created
March 23, 2020 21:57
-
-
Save fischgeek/9f5d4012dc55fd3f098fb680e3d67b52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
[<EntryPoint>] | |
let main argv = | |
let rec DoFib val1 val2 i = | |
if i > 0 then | |
let calc = val1 + val2 | |
if i = 1 then | |
Console.Write(calc.ToString()) | |
else | |
Console.Write(calc.ToString() + ",") | |
i-1 |> DoFib val2 calc | |
() | |
let Start () = | |
Console.Write("Iterations: ") | |
let iter = Console.ReadLine() | |
(int)iter |> DoFib 0 1 | |
Start() | |
Console.ReadLine() |> ignore | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment