I'll note, just for clarity, that Scala's `1 to 10` is technically just a
normal method call equivalent to `(1).to(10)`, with optional parentheses
removed.

Also, I'd prefer this to be a generator instead, so infinite ranges are
also possible, and so it doesn't have to be eager.

On Thu, Nov 3, 2016, 11:52 Hikaru Nakashima <[email protected]>
wrote:

> How about this
>
> ```
> for ( i of Array.range(1, 10) ) { ... }
> // OR
> for ( i of [1..10] )  { ... }
> ```
>
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to