July 2023
Beginner to intermediate
488 pages
14h
English
This chapter covers
State data typeIn this chapter, we’ll see how to write purely functional programs that manipulate state, using the simple domain of random number generation as the example. Although by itself it’s not the most compelling use case for the techniques in this chapter, the simplicity of random number generation makes it a good first example. We’ll see more compelling use cases in parts 3 and 4 of the book, especially part 4, where we’ll discuss dealing with state and effects in much greater detail. The goal here is to provide you with the basic pattern for making any stateful API purely functional. As ...
Read now
Unlock full access