Professor Frisby’s Mostly Adequate Guide to Functional Programming: Book Review

At my previous job, we had a couple of Haskell programmers on the team, so our code base was rich with functional programming trips and ticks. I felt the need to learn the paradigm, and chose this book as my starting point because it doesn’t add the complexity of learning a new language — and a useless one at that (our codebase was JavaScript and Kotlin) — to the task.

At the time of writing this, the book contained 12 chapters, all of which I had studied. “Studied” means I read them, took notes, quizzed myself, and solved the problems at the end. There also is a draft of Chapter 13, which I haven’t read. It’s important, I think, to stress that I got first exposed to functional production code, and only then started learning the paradigm more formally with this book.

I absolutely loved the language of the book. It’s funny and very easy to understand. The author doesn’t delve into technicalities (i.e. the category theory) too deep, and doesn’t indulge in oversimplified analogies either. The text is enhanced with quite a lot of references to North American culture, so being a newcomer here, I spent a lot of time googling unrelated stuff while working through the book. Whether that was the consequence of me being naturally curious person, or was understanding of the analogies essential to getting the author’s point, I don’t remember.

The problems at the end of each chapter were a bit of a disappointment — I found them to be too easy to my taste. They do, however, help the material to sink in (I am the kind of person who learns better by doing) — except maybe the last chapter or two, where the exercises were easy almost to the point of uselessness. Also, the reliance on Ramda seems to be excessive at times. An unrelated trivia fact: the book is open source.

Much more fun presents Chapter 6, where the project is. My advice on this chapter: The best way to proceed here is to use it as an asynchronous pair programming. Each code snippet is preceded with the description of what it does. Don’t hurry to read the code! Read the description first, then try to write it yourself. After you’re done, look at the code in the book and compare with yours.

Unfortunately, the project doesn’t utilize functors at all — they are introduced later, in Chapter 8. You can return to the project, however, and embellish it with functors on your own.

To sum up, I highly recommend this book not only to anyone who is curious about functional programming, but to any programmer in general, because even if you don’t use functional paradigm (at least not to the point of functors) in your work, the book still teaches you a useful thing or two (Chapter 2, for example). Incidentally, I am very pleased to see a good functional programming book that uses a practical, mainstream language.

The book can be found here: