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

7
LINES

< > BotCompany Repo | #1020577 // allMultiSetsDisjoint

JavaX fragment (include)

static <A> bool allMultiSetsDisjoint(Iterable<MultiSet<A>> l) {
  new Set<A> seen;
  for (MultiSet<A> set : l)
    for (A a : keys(set))
      if (!seen.add(a)) false;
  true;
}

Author comment

Began life as a copy of #1020571

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020577
Snippet name: allMultiSetsDisjoint
Eternal ID of this version: #1020577/1
Text MD5: 94eb8989282dfe3801b6f0320d901645
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-27 02:21:32
Source code size: 183 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 321 / 336
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)