Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
class Step {
|
||||
var end:Int;
|
||||
var step:Int;
|
||||
var index:Int;
|
||||
|
||||
public inline function new(start:Int, end:Int, step:Int) {
|
||||
this.index = start;
|
||||
this.end = end;
|
||||
this.step = step;
|
||||
}
|
||||
|
||||
public inline function hasNext() return step > 0 ? end >= index : index >= end;
|
||||
public inline function next() return (index += step) - step;
|
||||
}
|
||||
|
||||
class Main {
|
||||
static function main() {
|
||||
for (i in new Step(2, 8, 2)) {
|
||||
Sys.print('$i ');
|
||||
}
|
||||
Sys.println('WHOM do we appreciate? GRAMMAR! GRAMMAR! GRAMMAR!');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue