F# by Example: Hello World

open System

Our first program will print the classic “Hello, World!” message.

printfn "Hello, World!"

To run the program, put the code in hello-world.fs and use dotnet run.

$ dotnet fsi hello-world.fsx
Hello, World!

Now that we can run and build basic F# programs, let’s learn more about the language.

Next example: Values.