Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1028205 // overlappingIntPairs

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2553L/16K).

static L<IntPair> overlappingIntPairs(L<Int> l) {
  new L<IntPair> out;
  Iterator<Int> it = iterator(l);
  if (!it.hasNext()) ret out;
  int a = it.next();
  while (it.hasNext()) {
    int b = it.next();
    out.add(IntPair(a, b));
    a = b;
  }
  ret out;
}

Author comment

Began life as a copy of #1014575

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028205
Snippet name: overlappingIntPairs
Eternal ID of this version: #1028205/3
Text MD5: 72abd0eaeee56644679ed529f44c029f
Transpilation MD5: 1748d177d4f8990f87c1920ce8ceee12
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-26 13:22:02
Source code size: 271 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 125 / 190
Version history: 2 change(s)
Referenced in: [show references]