explaingit

mostlyadequate/mostly-adequate-guide

Analysis updated 2026-06-21

23,839JavaScriptAudience · developerComplexity · 1/5Setup · easy

TLDR

Mostly Adequate Guide to Functional Programming is a free online book that teaches functional programming concepts, pure functions, currying, functors, monads, using JavaScript as the teaching language with hands-on chapter exercises.

Mindmap

mindmap
  root((repo))
    What it does
      FP book in JavaScript
      Free online reading
      Hands-on exercises
    Core Concepts
      Pure functions
      Currying
      Functors and monads
    Use Cases
      Learn FP in JS
      Pre-Haskell foundation
      Cleaner code patterns
    Format
      Online book
      PDF and EPUB export
      Chapter exercises
    Audience
      JS developers
      Beginners to FP
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Learn functional programming fundamentals like pure functions and currying using JavaScript you already know, with exercises to practice each concept.

USE CASE 2

Build a solid foundation in functional programming before moving to a stricter FP language like Haskell or PureScript.

What is it built with?

JavaScript

How does it compare?

mostlyadequate/mostly-adequate-guidevalidatorjs/validator.jspure-css/pure
Stars23,83923,75123,742
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/52/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Read online for free, exercises run in any JavaScript environment with no installation needed.

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 just read the chapter on currying in Mostly Adequate Guide, write me three JavaScript exercises that practice currying a multi-argument function step by step.
Prompt 2
Explain functors and monads from Mostly Adequate Guide in plain English, then give me a simple JavaScript example I can run in my browser console.
Prompt 3
Using concepts from Mostly Adequate Guide, refactor this JavaScript function that uses a for-loop and mutations into a purely functional version using map and reduce.
Prompt 4
Write a JavaScript solution for the exercises at the end of Chapter 5 of Mostly Adequate Guide on composing pure functions.
Prompt 5
How do I apply the monad pattern from Mostly Adequate Guide to handle null checks in a real JavaScript project without throwing exceptions?

Frequently asked questions

What is mostly-adequate-guide?

Mostly Adequate Guide to Functional Programming is a free online book that teaches functional programming concepts, pure functions, currying, functors, monads, using JavaScript as the teaching language with hands-on chapter exercises.

What language is mostly-adequate-guide written in?

Mainly JavaScript. The stack also includes JavaScript.

How hard is mostly-adequate-guide to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is mostly-adequate-guide for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub mostlyadequate on gitmyhub

Verify against the repo before relying on details.