Skip to content

Explore this section

  • Effects as values kept apart from their execution, built up from a toy IO to Haskell IO, Cats Effect 3 and ZIO, with a comparison of the three and a study order for the Scala effect libraries.

  • Errors as values instead of exceptions: totality, Option, Either and Try, fail-fast versus accumulating validation and why accumulation is applicative, typed errors in effect types, and converting at boundaries.

  • Parallelism versus concurrency in functional code: deterministic parallelism with strategies and the Par monad, Haskell threads, MVar, async and STM, fibers in Cats Effect and ZIO, and laws that keep parallel code equivalent to sequential.

  • From lazy lists to effectful pull-based streams: why laziness gives modularity, why lazy I/O isn't enough, fs2, conduit and pipes, resource safety, backpressure and stream fusion.

  • Testing with properties instead of examples in QuickCheck and ScalaCheck: pure generators, shrinking, where good properties come from, testing type-class laws, and why purity makes it easy.

  • Why monads don't compose and the ways around it: monad transformers, mtl-style classes, service handles and ReaderT, free monads, tagless final and ZIO layers, with their trade-offs and when to pick which.