This is a series of hands-on examples that will teach you the basics of F#.
You should read the script files present in this repository in-order.
- Make sure that you have a F# environment installed. You can install F# on Mac, Linux and Windows.
- Recommended for beginners: Install Visual Studio Code and the Ionide plugin for enabling F# development within VS Code.
You should be able to create a new F# script file in your editor, and evaluate it. In VS Code, this means creating a new .fsx
file, and evaluating expressions by selecting them and pressing Alt-Enter
.
-
Introduction to primitive types in F#; using
let
to create immutable variables. -
Using
let
to create functions; calling functions; recursion. -
Introduction to F# types: tuples, records, discriminated unions.
-
F# collection types: lists, arrays, maps, sets.
-
Currying & partial applications; pipeline operator in F#; common operations defined in the sequence module.