Libraryless. Click here for Pure Java version (2555L/16K).
static <A, B> L<Pair<A, B>> zipTwoListsToPairs(L<A> l1, L<B> l2) { int n = min(l(l1), l(l2)); LPair<A, B> out = emptyList(n); for i to n: addPair(out, l1.get(i), l2.get(i)); ret out; }
Began life as a copy of #1017193
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1017453 |
| Snippet name: | zipTwoListsToPairs - uses length of shorter one |
| Eternal ID of this version: | #1017453/2 |
| Text MD5: | 9031262585335b74a24bd65424f3337b |
| Transpilation MD5: | 1eae13bcf36080498e7a99983a318e6d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-10-29 14:18:59 |
| Source code size: | 197 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 688 / 895 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |