Created
January 14, 2014 05:04
-
-
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.
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
Array.prototype.superMap = function( fn ){ | |
return this.map( function( x ){ | |
return fn.call(x); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[allong.es] has
send
that can be used to make something like this:Not exactly the same, but there are some other features you may want to consider if you implement
superMap
, such as being able to take some parameters: