sclass ListWalker extends Iterator { L list; int index; public A next() { if (index < l(list)) ret list.get(index++); null; } public bool hasNext() { ret index < l(list); } }