Language overview

We will now start our journey into functional programming using F#, and explore its capabilities in quantitative finance applications.

Let's start by looking at how values are declared, that is, how to bind values to names, mutability, and immutability.

To initialize and create a value, use the let keyword. let will bind the value on the right-hand side to the variable name on the left-hand side of the equals sign. This is a bind operator, a lot like math.

let sum = 4 + 5
let newsum = sum + 3

The let binding is also used in the same way for binding functions to a name, as we will see in the following sections.

Get F# for Quantitative Finance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.