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

7
LINES

< > BotCompany Repo | #1027948 // subListStartingAtIs

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

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

static <A> bool subListStartingAtIs(L<A> l, int i, A... items) {
  if (i < 0 || i+l(items) > l(l)) false;
  for j over items:
    if (!eq(l.get(i+j), items[j]))
      false;
  true;
}

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: #1027948
Snippet name: subListStartingAtIs
Eternal ID of this version: #1027948/1
Text MD5: 150a1377ae65db9409cae565e43c2d81
Transpilation MD5: 70b05ed0bed1b4c52c57cc2377d561c6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-20 13:18:13
Source code size: 189 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 101 / 159
Referenced in: [show references]