Created
July 26, 2018 09:02
-
-
Save wegry/19b56a506b12b8e865f2e2cadc8e38e1 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
| let range: (int, int) => array(int) = [%bs.raw | |
| (a, b) => {j| | |
| const ranger = {}; | |
| ranger[Symbol.iterator] = function* () { | |
| let current = a; | |
| while (a <= b) { | |
| yield a++; | |
| } | |
| } | |
| return [...ranger]; | |
| |j} | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment