Chapter 4. Toward modular, reusable code

This chapter covers

  • Comparing function chains and pipelines
  • Introducing the Ramda.js functional library
  • Exploring the concepts of currying, partial application, and function binding
  • Creating modular programs with functional composition
  • Enhancing your program’s flow with function combinators

A complex system that works is invariably found to have evolved from a simple system that worked.

John Gall, The Systems Bible (General Systemantics Press, 2012)

Modularity is one of the most important qualities of large software projects; it represents the degree to which programs can be separated into smaller, independent parts. Modular programs posses the distinct quality that their meaning can be derived from ...

Get Functional Programming in JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.