1 | static <A> L<Pair<A>> listToOverlappingPairs(L<A> l) { |
2 | new L<Pair<A>> out; |
3 | Iterator<A> it = iterator(l); |
4 | if (!it.hasNext()) ret out; |
5 | A a = it.next(); |
6 | while (it.hasNext()) { |
7 | A b = it.next(); |
8 | addPair(out, a, b); |
9 | a = b; |
10 | } |
11 | ret out; |
12 | } |
Began life as a copy of #1012218
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: | #1014575 |
Snippet name: | listToOverlappingPairs |
Eternal ID of this version: | #1014575/3 |
Text MD5: | b54deca55e69a530adaee2db79dc5b83 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-02 15:13:02 |
Source code size: | 266 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 397 / 472 |
Version history: | 2 change(s) |
Referenced in: | [show references] |