The Monad and You
summary
Monads are presented as a way to capture recurring patterns and enable safe composition, demonstrated with examples for lists, streams and Optional plus an in-memory dictionary. The talk shows Haskell-style type classes and Java 8 Streams/Optional as analogies and builds a small DB DSL (get/put/return) with a bind/splice implementation executed by a dictionary interpreter; the type system enforces correctness and supports law-based reasoning, and a project application uses a “Hope” monad for error handling.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:09Monads basics
- 7:44Map function
- 10:15Container types
- 15:32Functors with dicts
- 20:10DSL for DB ops
- 24:46DB program interpretation
- 30:20Composing programs
- 34:19Monads benefits
- 37:26Monad syntax
- 40:55Summary
related talks
31mMONADS - CODING FUNCTIONALLY
41mThe Free Monad by Example
45mOptimusPrimeT
49mScalaz, or: how I learned to stop worrying and love monads
01h 03mFunctional Programming Patterns for Mere Mortals
59mBuilding an Intuition for Composition
01h 35mRecursion Schemes, Algebras, Finally Tagless, Data Types
41mArchitectures Using Functional Programming Concepts
