© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. EasonStylish F# 6https://doi.org/10.1007/978-1-4842-7205-3_5

5. Immutability and Mutation

Kit Eason1  
(1)
Farnham, Surrey, UK
 

Nothing is so painful to the human mind as a great and sudden change.

—Mary Wollstonecraft Shelley, from the novel Frankenstein

These Folks Are Crazy!

Most software developers, for most of the history of programming, have been entirely comfortable with mutation . Code that uses mutation declares a variable (perhaps with some initial value, perhaps uninitialized) and then updates its value one or more times until some final result is achieved. It’s so natural of an approach (at least for those of us who came to programming via languages ...

Get Stylish F# 6: Crafting Elegant Functional Code for .NET 6 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.