Scalaz, or: how I learned to stop worrying and love monads
summary
Imports of Scalaz add real methods and typeclass instances so code compiles to safer, smaller APIs: disjunctions replace Either, Validation parses safely, and enhanced Option/Future/List methods appear. Examples show a generic add over a Functor, combining three map lookups with the Applicative builder to get an Option sum, using foldMap counting to aggregate lists and maps, and abstracting effects to abstract over Monad to swap Future for Id so tests run synchronously. All examples rely on compiler-checked implicits and behave as described.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 8:37Map
- 17:44Warnings
- 19:54Map classes
- 22:29Applicative
- 28:02FoldMap
- 33:25My eyes
- 34:06Imran art
- 37:01Social behavior
- 38:27Point
- 46:05Refactor
- 46:31Testing
- 47:04Future
related talks
01h 03mFunctional Programming Patterns for Mere Mortals
42mThe Monad and You
33mJourney to the Heart of the For-Yield
26mThe Power Of Small Abstractions
31mMONADS - CODING FUNCTIONALLY
01h 35mRecursion Schemes, Algebras, Finally Tagless, Data Types
52mGo Fully Functional and Take Your Legacy Code with You!
59mBuilding an Intuition for Composition
