Range generator
# Maël Nison (11 years ago)
Btw, I used the wrong syntax in my precedent mail. It should be:
[ for (n of Number.range(0, 12)) new Month(n) ]
Btw, I used the wrong syntax in my precedent mail. It should be:
[ for (n of Number.range(0, 12)) new Month(n) ]
Is there plans to add a range generator to the standard library ?
It would be especially useful with array comprehension, when initializing arrays:
this._year = [ new Month(n) for n of Number.range(0, 12) ]