Created
June 28, 2019 10:05
-
-
Save IwoHerka/bf79c93daf97a4021506894d8d947e6e to your computer and use it in GitHub Desktop.
Map implementation in JavaScript
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
map = (fn, [head, ...tail]) => (head === undefined ? [] : [fn(head), ...map(fn, tail)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment