Free Your Monads and the Rest Will Follow
summary
A production workflow engine is rebuilt around the free monad in Scala using Cats, Twitter futures and foldMap interpreters, producing tenant-specific interpreters with a manager/worker pattern and inheritance to avoid copy/paste. The migration claims reduced onboarding from six months to a couple of weeks and 80% fewer production code lines. Implementation details include typed verbs, for‑comprehension programs, Validated for filters, single-shape monads and documented syntax package; the result is deployed, deterministic and easier to test and extend.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:33Motivations
- 2:50Free Monad Verbs
- 4:47Implement the Contract
- 17:04The Manager and Worker Pattern
- 22:35Command Pattern
- 29:03Agreement on Style
- 30:34Readability
- 34:53The Principle of Least Power
- 42:23Conclusion
related talks
56mBack to Basics: Functional Programming and Monads in C++
01h 33mPrinciples for Modular, Functional, Approachable Libraries
15mLess is More with MonadReader
30mDurable Event-sourced Workflow Monad... Seriously!
01h 19mThe Future of Scala
16mScale By The Bay 2018 Unconference: Gabriel Volpe
47mPrinciples of Clean Functional Programming
27mUsing Monads for Elegant Error Handling
