> FP Insights█
An interactive deep-dive into Functional Programming in Scala — recommended by Boris (Anthropic CEO).
This is NOT a Scala book. These concepts apply in Python, JavaScript, Go, Rust — any language.
CHOOSE A CONCEPT
CONCEPT 01 · FOUNDATIONS
Referential Transparency
The one rule that makes code easy to test, debug, and reason about.
CONCEPT 02 · FOUNDATIONS
Pure Core / Thin Shell
The architecture that makes complex software testable with zero mocks.
CONCEPT 11 · FOUNDATIONS
Immutable Data & Structural Sharing
Why immutable data structures are fast, safe, and enable time-travel debugging.
CONCEPT 03 · FOUNDATIONS
Errors as Values
How Option/Result/Either make error handling composable and visible.
CONCEPT 04 · FOUNDATIONS
Laziness & Pipeline Fusion
How lazy evaluation fuses pipelines and enables infinite sequences.
CONCEPT 05 · FOUNDATIONS
State as a Return Value
The pattern behind Redux, React's useReducer, and testable state machines.
CONCEPT 12 · DESIGN
API-First Design
The FP method for designing libraries: start from ideal usage, derive types and laws.
CONCEPT 13 · DESIGN
Laws as Design Tools
Every abstraction has laws. Testing them as properties catches bugs that code review misses.
CONCEPT 06 · DESIGN
Property-Based Testing
Specify invariants; the framework generates hundreds of random test cases.
CONCEPT 07 · ABSTRACTIONS
Monoids & Associativity
Why associativity unlocks free parallelism in MapReduce, Spark, and more.
CONCEPT 14 · ABSTRACTIONS
Functor — Map Everything
The simplest context-aware abstraction. Arrays, Promises, Options are all functors.
CONCEPT 08 · ABSTRACTIONS
The Monad Pattern
The pattern behind Promises, async/await, optional chaining, and Result types.
CONCEPT 09 · ABSTRACTIONS
Applicative vs Monad
When to use Applicative (parallel/collect-all) vs Monad (sequential/fail-fast).
CONCEPT 10 · EFFECTS & IO
Description vs Execution
The FP strategy for IO, streaming, and all side effects. SQL and React already do this.
CONCEPT 15 · EFFECTS & IO
Trampolining & Stack Safety
How to make any recursive algorithm stack-safe by returning thunks instead of calling.
CONCEPT 16 · EFFECTS & IO
Stream Processing
Composable state machines that transform data streams with constant memory and resource safety.