static A popFirst(L l) { if (empty(l)) null; A a = first(l); l.remove(0); ret a; } static A popFirst(Collection l) { if (empty(l)) null; A a = first(l); l.remove(a); ret a; } static L popFirst(int n, L l) { L part = cloneSubList(l, 0, n); removeSubList(l, 0, n); ret part; }