static <A> int indexOfFirstChange(L<A> l) { int n = l(l); if (n < 2) ret -1; O value = l.get(0); for (int i = 1; i < n; i++) if (neq(value, l.get(i))) ret i; ret -1; }
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: | #1012579 |
Snippet name: | indexOfFirstChange - find first change in a list |
Eternal ID of this version: | #1012579/1 |
Text MD5: | 0bd0d1e00726e4492c8bbec680b70f4a |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-07 14:09:00 |
Source code size: | 195 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 471 / 488 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |