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

7
LINES

< > BotCompany Repo | #1020571 // allSetsDisjoint

JavaX fragment (include)

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

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: #1020571
Snippet name: allSetsDisjoint
Eternal ID of this version: #1020571/3
Text MD5: 8cb37f30ce1bfceecbf8e59778cc7a78
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-27 01:43:48
Source code size: 162 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 266 / 293
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1020572 - allSetsAreSingletons
#1020577 - allMultiSetsDisjoint