static <A> int indexOfOccurrence(L<A> l, A x, int n) { for (int i = 0; i < l(l); i++) if (eq(l.get(i), x) && --n < 0) ret i; ret -1; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004161 |
Snippet name: | indexOfOccurrence |
Eternal ID of this version: | #1004161/1 |
Text MD5: | 9b14e7616983e4790acff5d6b5bc0feb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-08 17:30:38 |
Source code size: | 153 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 587 / 596 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1008859 - countOccurrences_id - uses == |