1 | static <A, B> L<B> mapMultiSetByPopularity(MultiSet<A> ms, F2<A, Int, B> f) { |
2 | new L<B> l; |
3 | if (ms != null) for (A key : ms.highestFirst()) |
4 | l.add(callF(f, key, ms.get(key))); |
5 | ret l; |
6 | } |
7 | |
8 | static <A, B> L<B> mapMultiSetByPopularity(MultiSet<A> ms, IF2<A, Int, B> f) { |
9 | new L<B> l; |
10 | if (ms != null) for (A key : ms.highestFirst()) |
11 | l.add(callF(f, key, ms.get(key))); |
12 | ret l; |
13 | } |
Began life as a copy of #1015980
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024257 |
Snippet name: | mapMultiSetByPopularity - map MultiSet to List |
Eternal ID of this version: | #1024257/1 |
Text MD5: | 03114c7b43d5f7a78dd33f84288b7977 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-28 18:24:36 |
Source code size: | 397 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 278 / 322 |
Referenced in: | [show references] |