Created
November 6, 2019 12:25
-
-
Save DanShappir/34c4b3995b17e43f47ccf618ef276ff4 to your computer and use it in GitHub Desktop.
Simple map generator
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(src, op) { | |
for (const value of src) { | |
yield op(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment