explaingit

mostlyadequate/mostly-adequate-guide

23,838JavaScriptAudience · developerComplexity · 1/5StaleLicenseSetup · easy

TLDR

Free online book teaching functional programming concepts using JavaScript, with exercises and examples you can run in your editor.

Mindmap

mindmap
  root((repo))
    What it does
      Teaches FP concepts
      JavaScript examples
      Runnable exercises
    Key concepts
      Pure functions
      Currying
      Functors and monads
      Type classes
    Learning path
      Foundations first
      Build to advanced
      Real-world applicable
    Formats available
      Online reading
      PDF download
      EPUB version
    Audience
      JavaScript developers
      FP learners
      Pre-Haskell prep

Things people build with this

USE CASE 1

Learn functional programming fundamentals using a language you already know, then apply those patterns in your JavaScript projects.

USE CASE 2

Work through interactive exercises to practice pure functions, composition, and immutability before tackling a stricter FP language.

USE CASE 3

Build a mental model of advanced concepts like monads and functors through concrete JavaScript examples rather than abstract theory.

Tech stack

JavaScript

Getting it running

Difficulty · easy Time to first run · 5min
Free and open-source; you can read, share, and modify the book as long as you follow the license terms (typically permissive for educational content).

In plain English

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.

Copy-paste prompts

Prompt 1
I'm a JavaScript developer. Walk me through the first chapter of the Mostly Adequate Guide and explain what pure functions are with a concrete example.
Prompt 2
Show me how to use currying in JavaScript based on the patterns taught in the Mostly Adequate Guide. Give me a practical example I can use today.
Prompt 3
Explain functors and monads using the JavaScript examples from the Mostly Adequate Guide. Why would I want to use these in real code?
Prompt 4
I want to learn functional programming before switching to Haskell. Should I work through the Mostly Adequate Guide first, and what will it prepare me for?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.