Libraryless. Click here for Pure Java version (2986L/19K).
1 | static L<Int> indicesOfIC(L<S> l, S a) { |
2 | new IntBuffer buf; |
3 | for (int i = 0; i < l(l); i++) |
4 | if (eqic(l.get(i), a)) |
5 | buf.add(i); |
6 | ret buf.asVirtualList(); |
7 | } |
8 | |
9 | static <A> L<Int> indicesOfIC(S s, S x) { |
10 | int i = -1; |
11 | new IntBuffer buf; |
12 | while ((i = indexOfIC(s, x, i+1)) >= 0) |
13 | buf.add(i); |
14 | ret buf.asVirtualList(); |
15 | } |
Began life as a copy of #1004477
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017912 |
Snippet name: | indicesOfIC |
Eternal ID of this version: | #1017912/3 |
Text MD5: | b9eba914f88739c13d1d76f03fef39b1 |
Transpilation MD5: | d32dc79a08d24110ee276f2cb5e7b737 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-10-13 15:46:03 |
Source code size: | 347 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 351 / 430 |
Version history: | 2 change(s) |
Referenced in: | [show references] |