Created
October 29, 2020 22:02
-
-
Save ahafidi/14b2e0d8c6106488f65e74c3724a08ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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 && tail.length < 1) | |
? [] | |
: [fn(head), ...map(fn, tail)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment