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

9
LINES

< > BotCompany Repo | #1008813 // indexOfLiteralSubList

JavaX fragment (include)

static <A> int indexOfLiteralSubList(L<A> x, A... y) {
  outer: for (int i = 0; i+l(y) <= l(x); i++) {
    for (int j = 0; j < l(y); j++)
      if (neq(x.get(i+j), y[j]))
        continue outer;
    ret i;
  }
  ret -1;
}

Author comment

Began life as a copy of #1002135

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: #1008813
Snippet name: indexOfLiteralSubList
Eternal ID of this version: #1008813/1
Text MD5: 9ecb395b8bf1b2d901f6633e66dc74b1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-09 02:57:19
Source code size: 229 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 483 / 493
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)