Four Ways to Compose Synchronous Functions in JavaScript: Nest, Promise, Compose, & Pipeline

Introduction

Functional Programming is built around composing pure functions. Composing functions means taking all those useful functions you wrote and using them together to build more powerful functions, and even applications. This article will cover the 4 main ways to do that with synchronous code which includes the new pipeline operator. A future article will handle asynchronous options as well as dealing with partial applications and curried functions. If you’d like to play with the examples yourself, I have a Code Sandbox setup with basic and advanced examples.

Read more