static ItIt arrayIterator(A[] l) { ret l == null ?: new ItIt { int i = 0; public bool hasNext() { ret i < l.length; } public A next() { ret l[i++]; } }; }