Learn functional programming fundamentals using a language you already know, then apply those patterns in your JavaScript projects.
Work through interactive exercises to practice pure functions, composition, and immutability before tackling a stricter FP language.
Build a mental model of advanced concepts like monads and functors through concrete JavaScript examples rather than abstract theory.
Mostly Adequate Guide to Functional Programming is a free, open-source book that teaches the functional programming style using JavaScript as the teaching language. Functional programming (FP) is a different way of writing software, instead of giving the computer a list of steps to follow (called imperative programming), you build programs by composing small, pure functions that transform data predictably and without hidden side effects. The book uses JavaScript rather than a purpose-built FP language because most developers already know it, which lets you apply the concepts immediately in real projects. The book builds from foundational ideas like pure functions and currying (a technique where a function waiting for multiple arguments can be called with fewer, returning a new function for the rest), up to more advanced concepts like functors, monads, and type classes, terms from mathematics that describe powerful patterns for managing data transformation and side effects cleanly. Each chapter includes exercises you can run in your editor to practice what you have learned. The book is available to read online, and PDF and EPUB versions can be downloaded or generated locally. You would read this if you are a JavaScript developer who wants to understand functional programming concepts well enough to use them in everyday code, or as a foundation before learning a stricter FP language like Haskell or PureScript.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.