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

8
LINES

< > BotCompany Repo | #1033961 // matchTwoLists

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

Libraryless. Click here for Pure Java version (4576L/26K).

static <A> bool matchTwoLists(IF2<A, A, Bool> pred, L<A> l1, A[] l2) {
  int n = l(l1);
  if (n != l(l2)) false;
  for i to n:
    if (!pred.get(l1.get(i), l2[i]))
      false;
  true;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033961
Snippet name: matchTwoLists
Eternal ID of this version: #1033961/1
Text MD5: a53c05274a31d7aa9ef19fdb03803109
Transpilation MD5: 94892196603b866545073e2ec16136ad
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-14 23:48:58
Source code size: 193 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 64 / 101
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)