Evaluation in Cats: the Good, the Bad, and the Lazy
summary
Cats’ Eval provides a concrete way to encode evaluation strategies into types, offering now/always/later semantics that map to eager, repeated, and call‑by‑need behavior; it includes a defer and trampoline mechanism that lets recursive algorithms avoid stack overflow (demonstrated by a counter example where map alone still recurses but defer protects the stack). Examples show that mapping/flatMapping stays lazy, that calling .value defeats laziness, and that Eval underpins streaming, Foldable and lazy/infinite data structures.
AI-written summary · about
chapters (3)
related talks
58mLet’s Get Lazy—The Real Power of Functional Programming
45mOh, All the things you'll traverse
42mFunctional interpreters and you
34mEasy and Efficient Data Validation with Cats
02h 38mLazy Evaluation
31mCool toolz in the Scalaz and Cats toolboxes
21mGaticos & Monads
39mFunctional Error Handling with Cats
