VS Code Ionide

YouTube Link

  • Install dotnet core
  • Install Ionide-fsharp

F# Scripting

let vowels = set ['a'; 'e'; 'i'; 'o'; 'u']

let toPigLatin (str: string) =
    let firstChar = str.[0]
    if vowels.Contains firstChar then
        str + "yay"
    else
        str.[1..] + string firstChar + "ay"

Highlight the text and hit alt-enter. This sends you to F# interactive

// with fsi active, when you are on a line, you can hit alt enter and it sends it to fsi!
toPigLatin "Phillip"
toPigLatin "Cecil"

You can change all symbols toPigLatin to changeToPigLatin. Hit right click and select change symbols

Another is Find all references!

There is a go to shortcut too.

To run the fsx program in shell, run

dotnet fsi vowels.fsx

Info Panel

Hit ctrl-p and enter >#F open info panel

Try it on each word in:

let firstResult = aps |> Array.sumBy (fun struct(x, _) -> x)

  • On the right as you explore Array.Parallel, it gives you info on it!

To run in release:

dotnet run -c release