M-M-M-Monads!
summary
Sees clear, runnable PHP examples: an immutable stack and two collection implementations, then concrete implementations of a Maybe monad and a Many monad with create and then methods, plus a flatMap-based tag-cloud example that reduces nested loops. Shows chaining to eliminate explicit null checks, uses PHP short closures, and maps the pattern to promises, jQuery and Laravel query builders. Good if wanting hands‑on refactors and code you can copy and run.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:41Operations
- 3:26Rules
- 4:09ArrayStack
- 6:30LinkedListStack
- 8:19Stack Size Method
- 11:04ArrayCollection
- 12:02RangeCollection
- 13:38Collection Select Method
- 15:57Handling null
- 29:43Handling many
- 33:48Similar things
- 36:03Monad Within Method
related talks
30mMonad for dummies
42mMonads you already use without knowing it
27mMonad Stacks or: How I Learned to Stop Worrying and Love the Free Monad
36mAn introduction to monadic structures and functional programming
39mDemystifying Monads with Java
59mDo or don’t There’s no try Or is there The power of monads explained Sort of
34mMo' Problems, Mo 'Nads
41mLiving the Monadstic Life
