Skip to content

Instantly share code, notes, and snippets.

@jefflembeck
Created January 14, 2014 05:04
Show Gist options
  • Save jefflembeck/8413366 to your computer and use it in GitHub Desktop.
Save jefflembeck/8413366 to your computer and use it in GitHub Desktop.
I feel like this functionality should and likely already does exist. I just can't seem to get it in my head.
Array.prototype.superMap = function( fn ){
return this.map( function( x ){
return fn.call(x);
}
};
@jefflembeck
Copy link
Author

That's fantastic. Thanks @raganwald. Picking up your book on this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment