Libraryless. Click here for Pure Java version (4997L/27K).
static <A> int indexOfMax(L<A> l, IF1<A, Comparable> f) { new Best_comparable<Int> best; for i over l: best.put(i, f.get(l.get(i))); ret or(best!, -1); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033885 |
| Snippet name: | indexOfMax |
| Eternal ID of this version: | #1033885/3 |
| Text MD5: | 4afe3b632cedfb29bf4a034d4d521aa5 |
| Transpilation MD5: | 93d71f9697b66d3391eec4693245a62b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-01-08 22:57:11 |
| Source code size: | 168 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 375 / 510 |
| Version history: | 2 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |