4 F# Fundamentals

This chapter covers

  • Understanding the difference between expressions and statements
  • Working with immutable data

This chapter discusses two of the core features of F# that will have a large effect on how you write and design code: Expressions and immutability. Both features go hand-in-hand: without one, the other wouldn’t be especially useful. Both are designed to change the way you write code into one that’s oriented around working with values and applying transformations to those values as the basic mechanism of implementing any logic. That might sound complicated but don’t worry; it’s not.

4.1 Expressions

Expressions and statements are two sides of the same coin. They’re sometimes described in all sorts of complicated or ...

Get F# in Action 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.