static <A> LL<A> chunksOf1000(Collection<A> c) { new LL<A> out; Iterator<A> it = iterator(c); L<A> 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; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1011921 |
| Snippet name: | chunksOf1000 |
| Eternal ID of this version: | #1011921/3 |
| Text MD5: | a670c237747c8baa16825b7ae69645d2 |
| Author: | stefan |
| Category: | javax / collections |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-10 03:18:21 |
| Source code size: | 298 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 795 / 789 |
| Version history: | 2 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1015445 - chunksOf |