Chapter 2Functional Thinking for the Imperative Mind
by Michael Bevilacqua-Linn
It can be difficult to pin down exactly what functional programming is.
It’s difficult because the term, although theoretically well defined, has in practice come to encompass several different, though related, ideas. If you talk to a Clojure hacker, you’ll probably get an earful of macros. A Haskell programmer might talk about monads, and an Erlang programmer about actors.
These are all different concepts. Macros give programmers extremely powerful metaprogramming, monads allow us to model changing state safely, and actors provide a robust way of doing distributed and concurrent programming.
Yet all of these different ideas are seen as defining features ...
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