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

9
LINES

< > BotCompany Repo | #1012395 // indexOfLL

JavaX fragment (include)

1  
static <A> int indexOfLL(L<A> x, A... y) {
2  
  outer: for (int i = 0; i+l(y) <= l(x); i++) {
3  
    for (int j = 0; j < l(y); j++)
4  
      if (neq(x.get(i+j), y[j]))
5  
        continue outer;
6  
    ret i;
7  
  }
8  
  ret -1;
9  
}

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: #1012395
Snippet name: indexOfLL
Eternal ID of this version: #1012395/1
Text MD5: bd7e31602864590481d42249bea8420c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-30 01:13:50
Source code size: 217 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 456 / 482
Referenced in: [show references]