Part 4. Effects and I/O
Functional programming is a complete programming paradigm. All programs imaginable can be expressed functionally, including those that mutate data in place and interact with the external world by writing to files or reading from databases. In this part of the book, we apply what we covered in parts 1–3 to show how functional programming can express these effectful programs.
We begin chapter 13 by examining the most straightforward handling of external effects, using an I/O monad. This provides a simplistic embedded imperative syntax in a functional programming context. We can use the same general approach to handle local effects and mutation, which we introduce in chapter 14. Both of these chapters motivate the development ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access