static A popFirst(L l) { if (empty(l)) null; A a = first(l); l.remove(0); ret a; } static A popFirst(Cl l) { if (empty(l)) null; A a = first(l); l.remove(a); ret a; } static Pair popFirst(Map map) { if (map == null) null; var it = map.entrySet().iterator(); if (!it.hasNext()) null; var p = mapEntryToPair(it.next()); it.remove(); ret p; } static L popFirst(int n, L l) { L part = cloneSubList(l, 0, n); removeSubList(l, 0, n); ret part; } static AppendableChain popFirst(AppendableChain a) { ret a?.popFirst(); }