PragmaticBookshelf
Advanced Functional Programming with Elixir (PragProg)
Joseph Koski
Series editor: Sophie DeBenedetto @SophieDeBenedetto
Developmental editor Adaobi Obi Tulton @aotulton
Combine advanced functional programming concepts with production-ready Elixir and proven domain-driven design techniques to write cleaner, more thoughtful software. You’ll explore foundational ideas like equality, ordering, predicates, monoids, and monads—then go beyond syntax as you develop intuition for composing logic, modeling behavior, and growing systems. With a focus on maintainable, declarative code over theory, you’ll gain practical, composable patterns you can apply right away.
Get ready to manage crowds, adjust priorities, and keep everyone safe in FunPark, a place that never sits still. Your job is to model that complexity and build the systems that keep everything running smoothly, even as the business team is still figuring out what they want and the experts keep rewriting the rules.
Using core abstractions—equality, ordering, predicates, monoids, and monads—you’ll break problems into small, composable pieces that are both well-behaved and easy to combine. Rather than getting bogged down in theory or formal proofs, you’ll dive into real-world Elixir—using protocols, structs, and pattern matching to express shared behavior across your domain. Along the way, you’ll build the vocabulary and mental models you need to organize complex logic, supported by a production-ready open-source library you can use, extend, and explore in your own projects.
Whether you’re an Elixir developer mastering functional programming or a functional programmer exploring Elixir, you’ll discover how to write code that’s easier to reason about—and create systems that stay understandable, even as they grow.
Joseph Koski is a software engineer with expertise in functional programming, domain-driven design, and safety-critical systems. He created the Funx library, bringing tools like monads to Elixir. He writes at www.joekoski.com, sharing insights on functional programming, real-time systems, and using Elixir to solve complex, reliability-focused problems.
- Full details: Advanced Functional Programming with Elixir: Model Behavior, Manage Complexity, and Maximize Maintainability by Joseph Koski
- View this book’s portal and details on how to post errata and suggestions here.
Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout ![]()
Most Liked
slouchpie
I just bought the book. I will start reading it over the weekend.
arcanemachine
Alright, another one to add to the library!
P.S. Need to add “www” in the link to the author’s personal site.
MikeRocke
Amazing! Thank you so much! Looking forward to this!
roriholm
Looks like a great entry to the PP Elixir lineup. I look forward to lighting up a pipe or cigar and taking it in.
arcanemachine
On a scale of 1-10 , would you recommend this book for someone who considers themself a “working man programmer” and not really reading for the theory or intellectual stimulation.
To answer your question directly, I would personally say “no”, but I still think the book is worth a read. (If you have to manage applications with a lot of complicated rules and are looking for a way to wrangle the complexity, I would probably say “yes”, the book may be directly useful to you.)
For me, this book was definitely very intellectually stimulating, and I feel like the techniques involved would be very useful in managing the organization of ever-increasing complexity. For example the book uses amusement park ride management as an example, but the same situation can happen with many legacy applications as the rules (and exceptions to those rules) grow like a cancerous tumor.
If the concepts in the book are applied properly, I do believe that they could be used to compose the logic required to manage some pretty complicated scenarios. Of course, I haven’t yet had the opportunity to do this, but I look forward to using this tool if I find a need for it in the future.
This book is pretty much a guided tour of the Funx library. It gives you the logical bits and pieces from that library, and shows how the different parts come together from the ground up, and how they work with each other.
I don’t know if it is essential to read the book before using the library, but I will say this: Before I read the book, I had no idea what any of the stuff in the Table of Contents meant, but after I read the book, it made perfect sense. I think that it would be a big undertaking to understand what’s happening in Funx without reading the book beforehand, unless you’re familiar with Haskell. (I believe that Haskell is the source of a lot of the concepts used in the book.)








