In Visual Studio Code enter the following code then, to run it, highlight it and press Option Enter:
let helloWorld =
"Hello from FSI"
printfn "%s" helloWorld
and get this result:
In Visual Studio Code enter the following code then, to run it, highlight it and press Option Enter:
let prefix preStr postStr =
preStr + ", " + postStr
prefix "Hello" "Greg"
and get this result:
val it : string = "Hello, Greg"
In Visual Studio Code enter the following code then, to run it, highlight it and press Option Enter:
let names = ["Joe"; "Sue"; "Mary"; "Bill"]
names
|> Seq.map (prefix "Hello")
and get this result:
val it : seq =
seq ["Hello, Joe"; "Hello, Sue"; "Hello, Mary"; "Hello, Bill"]