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

8
LINES

< > BotCompany Repo | #1015425 // multiSetSetIntersection

JavaX fragment (include)

static <A> MultiSet<A> multiSetSetIntersection(MultiSet<A> a, Set<A> b) {
  MultiSet<A> ms = similarEmptyMultiSet(a);
  Set<A> bSet = asSet(b);
  for (A x : keys(a))
    if (bSet.contains(x))
      ms.add(x, a.get(x));
  ret ms;
}

Author comment

Began life as a copy of #1009544

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: #1015425
Snippet name: multiSetSetIntersection
Eternal ID of this version: #1015425/1
Text MD5: 7c9771ee9a0abb8f73e219fb8d01e8e7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-13 20:26:24
Source code size: 237 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 386 / 431
Referenced in: [show references]