srecord ListAndIndex(L list, int idx) { bool atEnd() { ret idx >= l(list); } A get() { ret _get(list, idx); } }