Created
December 12, 2017 07:16
-
-
Save jooyunghan/c46ea7248bdec657afdc19b3ed154c0c 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
| function* map(values, gf) { | |
| const result = []; | |
| for (let i = 0; i < values.length; i++) { | |
| result.push(yield* gf(values[i], i, values)); | |
| } | |
| return result; | |
| } | |
| function* knockCodeHandler(preset) { | |
| while (true) { | |
| const input = yield* map(preset, function*() { return getCode(yield) }); | |
| //.. | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment