Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
We should add helper methods to Number to support this
for (i in 10.step(1, 2))
{ ... }(i.e. provide one which doesn't take a closure and returns an iterator instead).
Also we should offer a step() feature on ranges so we can do things like
for (i in (10..1).step(2)) { ... }
or
(10..1).step(2)
{ ... }