Libraryless. Click here for Pure Java version (5067L/28K).
ifndef EnforceFunctionTypes static HashSet mapToHashSet(O f, Iterable l) { HashSet x = l cast Cl ? new HashSet(l.size()) : new HashSet; if (l != null) for (O o : l) x.add(callF(f, o)); ret x; } endifndef static <A, B> HashSet<B> lambdaMapLike mapToHashSet(IF1<A, B> f, Iterable<A> l) { HashSet<B> x = l cast Cl ? new HashSet(l.size()) : new HashSet; if (l != null) for (A o : l) x.add(f.get(o)); ret x; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1011181 |
| Snippet name: | mapToHashSet - map function, return as hash set |
| Eternal ID of this version: | #1011181/16 |
| Text MD5: | 4178a119c7d0666f4b36eb5efe691031 |
| Transpilation MD5: | feada48935ffc3e67627db9cfdaf3797 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-12 22:58:27 |
| Source code size: | 439 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 761 / 959 |
| Version history: | 15 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1018022 - mapToCISet - map function, return as CI set #1028990 - mapToTreeSet - map function, return as tree set #1031609 - mapToLinkedHashSet - map function, return as LinkedHashSet #1033740 - mapToArrayList |