Libraryless. Click here for Pure Java version (4997L/27K).
1 | static <A> int indexOfMax(L<A> l, IF1<A, Comparable> f) { |
2 | new Best_comparable<Int> best; |
3 | for i over l: |
4 | best.put(i, f.get(l.get(i))); |
5 | ret or(best!, -1); |
6 | } |
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: | 142 / 228 |
Version history: | 2 change(s) |
Referenced in: | [show references] |