July 2023
Beginner to intermediate
488 pages
14h
English
This chapter covers
Functional programming (FP) is based on a simple premise with far-reaching implications: we construct our programs using only pure functions —in other words, functions that have no side effects. But what are side effects? A function has a side effect if it does something other than simply return a result. This includes, for example, the following cases:
Modifying a variable
Modifying a data structure in place
Setting a field on an object
Throwing an exception or halting with an error
Printing to the console or reading user input
Reading from ...
Read now
Unlock full access