Skip to content

Instantly share code, notes, and snippets.

@mcanas
Last active September 9, 2016 21:11
Show Gist options
  • Save mcanas/5551cda70140709cffe8fae69f8d859a to your computer and use it in GitHub Desktop.
Save mcanas/5551cda70140709cffe8fae69f8d859a to your computer and use it in GitHub Desktop.
untitled
function pipe( fns ) {
return function( x ) {
return fns.reduce(function(v, fn) {
return fn(v);
}, x );
};
}
function split( del ) {
return function( str ) {
return str.split(del);
}
}
var s = split(' ');
s("The quick brown fox");
function map( fn ) {
return function( args ) {
return fn.bind(null, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment