Last active
September 25, 2019 15:50
-
-
Save Phoenix35/60caa9559839a804a3e478c8cb3e77f6 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
| export default function *filterMap (predicate, mapFn, it) { | |
| let i = 0, | |
| j = 0; | |
| for (const x of it) { | |
| if (predicate(x, i++, it)) | |
| yield mapFn(x, j++, it); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment