“Functional programming: functors and monads"
summary
Covers concrete C++ examples: implements fmap for optional/vector/future using Boost optional, std::vector and futures, shows how fmap replaces manual loops and checks, defines join flattens nested monads to turn optional<optional<T>> or vector<vector<T>> into single-layer values, derives mbind as fmap+join, sketches a C++ do-style flow using lambdas as chained monadic binds, and argues exceptions can be treated as error monads. Materials and code live on the conference GitHub.
AI-written summary · about
chapters (11)
- 0:00Introduction to functors
- 2:08What is a functor
- 8:23Fmap and its use cases
- 13:03Why functors are useful
- 15:40Introduction to monads
- 18:10Monadic bind explained
- 21:22Monads as programmable semicolons
- 23:54Do notation in C++
- 25:00Pure functions and exceptions
- 25:47Category theory introduction
- 26:51Q&A on functional concepts
related talks
01h 16mFunctional Composition Beyond Monads
01h 03mMonads in Modern C++
58mMonoids, Monads, and Applicative Functors: Repeated Software Patterns
01h 47mFunctional C++
01h 31mFunctional Programming in Modern C++: The Imperatives Must Go!
36mAn introduction to monadic structures and functional programming
01h 06mThe Functional Programmer's Toolkit
01h 02mFunctional C++
