/free-monads-from-scratch

Free monads from scratch is a talk about Free monads, their motivation, their use cases for "real-world applications", and their implementation. It is mostly based on Wouter Swierstra's paper, Data Types à la carte.

Primary LanguageScala

Free monads from scratch - A way to deal with effectful programs

Free monads from scratch is a talk about Free monads, their motivation, their use cases for "real-world applications", and their implementation. It is mostly based on Wouter Swierstra's paper, Data Types à la carte.

Disclaimer

The implementations in this repository are solely meant for educational purposes. They are neither stack-safe nor very performant, and shouldn't be used in production. If you want the awesomeness of Free monads for your application, please use one of the widely-available implementations.

Repository structure

  • presentation.md is the source for the slideshow, generated using Deckset
  • scala-samples is a sbt project with several modules:
    • The data-types-a-la-carte module contains a Free monad implementation loosely based on Data types à la carte
    • The cats-free-monads module contains examples of using cats-free to structure programs
  • Similarly, haskell-samples is a stack project with several packages
    • The data-types-a-la-carte package contains a Free monad implementation loosely based on Data types à la carte
    • The free-package package contains examples of using free to structure programs

Acknowledgments

This talk wouldn't have been possible without the work of these amazing people:

Get in touch