Created
February 20, 2017 11:14
-
-
Save VoloshchenkoAl/4ae4e6e7f84d3731dd33c2270425a552 to your computer and use it in GitHub Desktop.
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
function map$viaReduce (array, fn) | |
{ | |
return array.reduce(function (memo, item, index, array) | |
{ | |
return memo.concat([ fn(item, index, array) ]); | |
}, []); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment