Libraryless. Click here for Pure Java version (4817L/27K).
1 | static <A, B> MultiSet<B> lambdaMapLike mapToMultiSet(IF1<A, B> f, A[] l) { |
2 | new MultiSet<B> ms; |
3 | if (l != null) for ping (A o : l) |
4 | ms.add(f.get(o)); |
5 | ret ms; |
6 | } |
7 | |
8 | static <A, B> MultiSet<B> lambdaMapLike mapToMultiSet(IF1<A, B> f, Iterable<A> l) { |
9 | new MultiSet<B> ms; |
10 | if (l != null) for ping (A o : l) |
11 | ms.add(f.get(o)); |
12 | ret ms; |
13 | } |
14 | |
15 | static <A, B> MultiSet<B> mapToMultiSet(A[] l, IF1<A, B> f) { |
16 | ret mapToMultiSet(f, l); |
17 | } |
18 | |
19 | static <A, B> MultiSet<B> mapToMultiSet(Iterable<A> l, IF1<A, B> f) { |
20 | ret mapToMultiSet(f, l); |
21 | } |
Began life as a copy of #1003239
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032630 |
Snippet name: | mapToMultiSet |
Eternal ID of this version: | #1032630/4 |
Text MD5: | 6b1cdf3b28b02be361ebd3f6c170d3a1 |
Transpilation MD5: | b490e4a2d8a16ecd73923965a0a2173e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-29 21:57:30 |
Source code size: | 556 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 160 / 215 |
Version history: | 3 change(s) |
Referenced in: | [show references] |