F# For Dummys - Day 2

61 阅读1分钟

Setting environments

  • Option 1:
    Try it in your browser: when you can access the Internet on your computer
    Try F# (fsharp.org) is based on Fable 2.0.11
    Fable REPL is based on the latest version
    Let's try the lastest version, open fable.io/repl/

image.png input or copy and paste code below in the edit area, press the run button on the left sidebar

let hello = "Hello, World!"
printfn $"{hello}"

you will see the output of your code on the Console window at lower right corner, good start!

image.png

image.png or from the releases page Download .NET 8.0 (Linux, macOS, and Windows) (microsoft.com)

image.png double click the exe file

image.png
click install, follow the hints, click next until it finished
open a new command window

image.png run the following command to test if your environment is ready

dotnet --version

output

image.png

you can follow the official guide if you're using Linux or macOS, all our code in the following articles will be running on Windows(10/11), it should not be a problem if you're not using Windows, as F# is expected to run on Linux or macOS without change, it's not guaranteed 100% though.