This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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)); |