Functional Programming with Effects
summary
Derives monads from function composition and implements the required operations — pure and flatMap-derived fish operator — then checks the identity and associativity laws (Cats/Scalaz help with testing). Shows concrete effects: Option for validation returning None on empty strings, Either giving the first Left failure, List producing a Cartesian product, Reader threading configuration, and a state-based PRNG d6 that takes a seed and deterministically returns rolls and a new seed. Demonstrations compose these effectful computations and show which ones are commutative and which are not.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 4:38What is functional programming
- 16:39Effects vs side effects
- 27:30Composing effects with monads
- 41:41Summary and next steps
related talks
50mFunctional Programming with Effects
14mFundamentalist Functional Programming
28mA Series of Unfortunate Effects
01h 06mThe Evolution of Effects
31mThe Eff monad, one monad to rule them all
43mSurviving a world overflowing with effects
21mEffectful Lenses: There and Back with Different Monads
41mFunctional programming: Give it a chance!
