static LL chunksOf1000(Collection c) { new LL out; Iterator it = iterator(c); L l = new L(1000); while (it.hasNext()) { l.add(it.next()); if (l(l) >= 1000) { out.add(l); l = new L(1000); } } if (nempty(l)) out.add(l); ret out; }