Learning F# — Part 8 — dotnet

dotnet --version
2.1.301
dotnet new sln --name Launch
dotnet new console --name launcher -lang F#
dotnet new classlib --name countdown -lang F#
Launch folder
dotnet sln .\Launch.sln add .\launcher\launcher.fsproj .\countdown\countdown.fsproj
module Counter
let rec countDown x =
if x<=0 then 0
else
printf "%d\n" (x)
countDown (x-1)
dotnet add .\launcher\launcher.fsproj reference .\countdown\countdown.fsproj
open System
open Counter
[<EntryPoint>]
let main argv =
let countedDownTo = (countDown 10)
printf "T minus %d. Lift off!" countedDownTo
0
dotnet run
10
9
8
7
6
5
4
3
2
1
T minus 0. Lift off!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store