Skip to content

Instantly share code, notes, and snippets.

@peterpme
Created March 3, 2014 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterpme/9334313 to your computer and use it in GitHub Desktop.
Save peterpme/9334313 to your computer and use it in GitHub Desktop.
Partial Application using Map
// Partial Application using Map and passing in a function
var oldArray = [1,4,9,16,25];
console.log(oldArray);
var newArray = oldArray.map(
function(n){
return n*n;}
);
console.log(newArray);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment