1 | static <A> LL<A> groupInFixedSizeRows(L<A> l, int rowSize) { |
2 | new LL<A> matrix; |
3 | for (int i = 0; i < l(l); i += rowSize) |
4 | matrix.add(subList(l, i, i+rowSize)); |
5 | ret matrix; |
6 | } |
7 | |
8 | static <A> LL<A> groupInFixedSizeRows(A[] l, int rowSize) { |
9 | ret groupInFixedSizeRows(asList(l), rowSize); |
10 | } |
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: | #1008611 |
Snippet name: | groupInFixedSizeRows - transform list into list of lists |
Eternal ID of this version: | #1008611/3 |
Text MD5: | 68ee8eb1acce27877f2dceed43c01dd5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-25 16:57:00 |
Source code size: | 300 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 540 / 557 |
Version history: | 2 change(s) |
Referenced in: | [show references] |