Functional Design Patterns
summary
Uses F# code to show exact patterns: uses a NonZeroInt type and Option return to make a divide function total, demonstrates partial application for DI by baking a DB connection into a getCustomer function, extracts looping via fold to remove duplicate code, lifts functions with map for Option/List/Async, and applies bind (option/task) to flatten error handling into a linear pipeline for request validation/update/email. Shows monoids (reduce) for parallelizable aggregation and that these constructions actually simplify real code.
AI-written summary · about
chapters (20)
- 0:00Introduction to FP design
- 3:20Core functional principles
- 6:13Functions and composition
- 9:23Functional design patterns
- 11:45Types as data, not behavior
- 15:06Domain modeling with types
- 16:57Designing for totality
- 20:52Functions as parameters
- 25:11Functions as interfaces
- 29:15Currying and partial application
- 32:08Pipeline processing and DI
- 34:37Dependency injection with partial application
- 37:49Continuations and chaining
- 40:53Monads for error handling
- 43:24Demystifying monads
- 47:18Railway oriented programming
- 49:41Maps and functors
- 52:37Monoids and aggregation
- 55:43Monoids in practice
- 1:03:54Conclusion
related talks
01h 00mFunctional architecture - The pits of success
57mPipeline-oriented programming
01h 01mMoving IO to the edges of your app: Functional Core, Imperative Shell
24mA Few Good Design Patterns
42mStratified design and functional architecture
01h 01mThe Power of Composition
52mFrom Dependency injection to dependency rejection.
52mJavaScript Design Patterns
