Skip to content

Instantly share code, notes, and snippets.

@fischgeek
Created March 23, 2020 21:57
Show Gist options
  • Save fischgeek/9f5d4012dc55fd3f098fb680e3d67b52 to your computer and use it in GitHub Desktop.
Save fischgeek/9f5d4012dc55fd3f098fb680e3d67b52 to your computer and use it in GitHub Desktop.
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