Skip to content

Instantly share code, notes, and snippets.

@99966
99966 / ch01-magic-run.js
Created December 1, 2019 14:20 — forked from luijar/ch01-magic-run.js
Functional Programming in JavaScript Chapter 01 - run function
/*
* Functional Programming in JavaScript
* Chapter 01
* Magical -run- function in support of Listing 1.1
* Author: Luis Atencio
*/
// -run- with two functions
var run2 = function(f, g) {
return function(x) {
return f(g(x));