Libraryless. Click here for Pure Java version (2776L/16K).
static <A> Map<S, A> lambdaMapLike ciMapToKeys(IF1<A, S> f, Iterable<A> l) { Map<S, A> map = ciMap(); fOr (A a : l) map.put(f.get(a), a); ret map; } static <A> Map<S, A> ciMapToKeys(Iterable<A> l, IF1<A, S> f) { ret ciMapToKeys(f, l); }
Began life as a copy of #1028140
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030741 |
Snippet name: | ciMapToKeys - iterate on list, keep object as value, function result as key |
Eternal ID of this version: | #1030741/6 |
Text MD5: | cd40666af0ba6cc5f080173fc0da21d6 |
Transpilation MD5: | 54176bd6d72b927e1655615884f612eb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-18 21:04:23 |
Source code size: | 258 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 180 / 261 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |