The Definitive Guide to Functional Programming in Cpp
summary
C++ workflows become declarative pipelines using std::ranges views (transform, filter, chunk_by, join) to avoid eager intermediate containers and enable lazy one-element-at-a-time processing, with cartesian_product and zip for combining ranges and iota or generators with co_yield for infinite sequences like Fibonacci. Error and control flow use std::optional / std::expected patterns (transform, and_then, transform_error, or_else) and the async layer uses senders/receivers plus sync_wait. Claims: lazy pipelines reduce allocations, swapping to a parallel execution policy (C++26) parallelizes searches, and generators keep Fibonacci lazy and efficient.
AI-written summary · about
chapters (5)
- 0:00Functional programming intro
- 6:47Composing algorithms in C++
- 33:40Functions with optional/expected
- 59:51IO actions in FP
- 1:07:13Monads and composition
related talks
01h 31mFunctional Programming in Modern C++: The Imperatives Must Go!
49mThe Evolution of Functional Programming in C++
49m“Applying functional programming in code design"
01h 02mFunctional C++
01h 47mFunctional C++
01h 10mSafe and Readable Code - Monadic Operations in C++23
57mAnd Then() Some(T) Functional Adventures With C++23 std::optional and std::expected
01h 04mFunctional C++ For Fun And Profit
