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

9
LINES

< > BotCompany Repo | #1018236 // magicSubListsToIntRanges - returns null if not actual sublists

JavaX fragment (include)

static <A> L<IntRange> magicSubListsToIntRanges(L<A> original, LL<A> lists) {
  L<IntRange> out = emptyList(lists);
  for (L l : lists) {
    int i = magicIndexOfSubList(original, l);
    if (i < 0) null;
    out.add(intRange(i, i+l(l)));
  }
  ret out;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018236
Snippet name: magicSubListsToIntRanges - returns null if not actual sublists
Eternal ID of this version: #1018236/2
Text MD5: 8f2581e62558ebe8f605e1426c214810
Author: stefan
Category: javac
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-11 17:19:59
Source code size: 263 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 226 / 245
Version history: 1 change(s)
Referenced in: [show references]