Composition
summary
Shows a concrete way to stop inventing classes and start composing behavior: models a Topologist example in Haskell and Ruby, rewrites inheritance as Haskell-inspired function pipelines and lightweight objects that respond to call, demonstrates lifting to handle failures with Either-style error handling, and refactors a real SMS order service into small, testable, immutable steps. Expect runnable patterns, code shapes, and pros/cons for adopting this style in Ruby.
AI-written summary · about
chapters (15)
- 0:00Intro
- 4:01Category Theory
- 4:51Object Composition
- 10:31Observations
- 12:11Function Composition
- 16:42Advantages
- 24:18Topologists in Haskell in Ruby
- 27:21Embedded Haskell
- 31:33Example - Medlink
- 34:18Example - Composed
- 37:02Example - Extracted
- 38:27Example - Maybe
- 40:39Example - Either
- 42:00Example - Logging
- 42:53Extending Composition








