Lesson 6. Working with immutable data

Working with immutable data is one of the more difficult aspects of functional programming to deal with, but as it turns out, after you get over the initial hurdle, you’ll be surprised just how easy it is to write entire applications working with purely immutable data structures. It also goes hand in hand with many other F# features you’ll see, such as expression-based development. In this lesson, you’ll learn

  • The basic syntax for working with immutable and mutable data in F#
  • Some reasons you should consider immutability by default in software development today
  • Simple examples of working with immutable values to manage changing state

6.1. Working with mutable data—a recap

Let’s start by thinking about ...

Get Get Programming with F#: A guide for .NET developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.