Libraryless. Click here for Pure Java version (2460L/16K).
1 | static <A, B> LinkedHashMap<A, B> listToMapWithKeyMaker(L<B> l, IF1<Int, A> f) {
|
2 | new LinkedHashMap<A, B> map; |
3 | int n = l(l); |
4 | for i to n: |
5 | map.put(f.get(i), l.get(i)); |
6 | ret map; |
7 | } |
Began life as a copy of #1014587
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028768 |
| Snippet name: | listToMapWithKeyMaker |
| Eternal ID of this version: | #1028768/1 |
| Text MD5: | aed59ecadb79b3a8e4fb9c179c56b4b8 |
| Transpilation MD5: | 4a779b2cddc6a1528ec2238e0225a550 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-08 00:14:32 |
| Source code size: | 193 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 416 / 536 |
| Referenced in: | [show references] |