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

8
LINES

< > BotCompany Repo | #1025349 // differingIndices

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

Libraryless. Click here for Pure Java version (2131L/14K).

static <A> L<Int> differingIndices(L<A> l1, L<A> l2) {
  if (l(l1) != l(l2)) null;
  new L<Int> out;
  for i over l1:
    if (!eq(l1.get(i), l2.get(i)))
      out.add(i);
  ret out;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025349
Snippet name: differingIndices
Eternal ID of this version: #1025349/4
Text MD5: ae333e4b1b31ef9f4ca3023d50682edd
Transpilation MD5: 7ad44a6e124be44e0cf6f4ea69939405
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-24 14:42:24
Source code size: 190 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 194 / 285
Version history: 3 change(s)
Referenced in: [show references]