Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1024459 // multiSetMapToMultiSet - stores keys + their occurrence count (drops values)

JavaX fragment (include)

static <A, B> MultiSet<A> multiSetMapToMultiSet(MultiSetMap<A, B> mm) {
  new MultiSet<A> ms;
  for (A a : keys(mm))
    ms.add(a, l(mm.get(a)));
  ret ms;
}

Author comment

Began life as a copy of #1010848

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: #1024459
Snippet name: multiSetMapToMultiSet - stores keys + their occurrence count (drops values)
Eternal ID of this version: #1024459/1
Text MD5: 86c2dbcffdd4d8a7c77fb627914530a9
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-13 12:24:55
Source code size: 162 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 238 / 295
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)