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

6
LINES

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

JavaX fragment (include)

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

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010848
Snippet name: multiMapAsMultiSet - stores keys + their occurrence count (drops values)
Eternal ID of this version: #1010848/2
Text MD5: dedda3b964dedd29ef0825489102811e
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-04 20:56:42
Source code size: 156 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 529 / 552
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1024459 - multiSetMapToMultiSet - stores keys + their occurrence count (drops values)
#1025893 - pairsToCIMultiSet