November 2009
Intermediate to advanced
560 pages
21h 40m
English
Everything in functional programming is immutable, which means that it can’t change once it’s created. This rule applies to values of variables as well as to the state stored in data types (objects) and has several important implications.
Instead of variables, we use values (section 2.2.1), which are immutable (3.1). Data structures are immutable too (2.2.2, 3.2), which makes understanding programs easier (1.3.3). Immutability is important for refactoring (11.1) and unit testing (11.2), and it allows us to optimize programs using lazy evaluation (11.3). Immutability also plays an important role when we parallelize code (1.4.3, 14.1.3, 14.3).
Code is written as ...
Read now
Unlock full access