@@ -0,0 +1,21 @@
+class IntIter implements Iterator<Int> {
+
+ var min : Int;
+ var max : Int;
+ public function new( min : Int, max : Int ) {
+ this.min = min;
+ this.max = max;
+ }
+ public function hasNext() {
+ return min != max;
+ public function next() {
+ if( min < max )
+ return min++;
+ return min--;
+}
@@ -0,0 +1,6 @@
+interface Iterator<T> {
+ function hasNext() : Bool;
+ function next() : T;
@@ -2,6 +2,8 @@
import Array;
import Date;
import ImportAll;
+import IntIter;
+import Iterator;
import List;
import Math;
import Std;