O'Reilly logo

Functional Programming: A PragPub Anthology by Michael Swaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required