Libraryless. Click here for Pure Java version (2131L/14K).
1 | static <A> L<Int> differingIndices(L<A> l1, L<A> l2) { |
2 | if (l(l1) != l(l2)) null; |
3 | new L<Int> out; |
4 | for i over l1: |
5 | if (!eq(l1.get(i), l2.get(i))) |
6 | out.add(i); |
7 | ret out; |
8 | } |
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: | 197 / 288 |
Version history: | 3 change(s) |
Referenced in: | [show references] |