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