Created
October 29, 2020 01:56
-
-
Save okabe-yuya/16074f486b07c2404dff0dcb53776bb3 to your computer and use it in GitHub Desktop.
これBIFで用意しておいてほしい
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 range = (a, z) => _range(a, z, []) | |
const _range = (a, z, acc) => a < z + 1 ? _range(a+1, z, acc.concat(a)) : acc | |
const print = (v) => console.log("[info]", v) | |
print(range(1, 10)) // [info] [1, 2, .... 10] | |
print(range(1, 100)) // [info] [1, 2, .... 100] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment