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

12
LINES

< > BotCompany Repo | #1009488 // differencesElementByElement

JavaX fragment (include)

static <A> L<Triple<A, A, Int>> differencesElementByElement(L<A> a, L<A> b) {
  L<Triple<A, A, Int>> l = new L;
  if (l(a) != l(b)) ret l;
  int n = l(a);
  for i to n: {
    A aa = a.get(i);
    A bb = b.get(i);
    if (neq(aa, bb))
      l.add(triple(aa, bb, i));
  }
  ret l;
}

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: #1009488
Snippet name: differencesElementByElement
Eternal ID of this version: #1009488/3
Text MD5: 863b61f805aa28d6a8b383367c58b21d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-04 17:36:26
Source code size: 291 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 410 / 458
Version history: 2 change(s)
Referenced in: [show references]