Created
October 19, 2016 03:43
-
-
Save jasonbellamy/9073ae64584fcbce7a1078bb01cde698 to your computer and use it in GitHub Desktop.
recursive implementation of mapWith
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
const mapWith = (fn, [head, ...tail]) => ( | |
(head === void 0) ? [] : [fn(head), ...mapWith(fn, tail)] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment