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

7
LINES

< > BotCompany Repo | #1017083 // allDifferent

JavaX fragment (include)

static <A> bool allDifferent(Iterable<A> l) {
  if (l == null) true;
  new HashSet<A> set;
  for (A a : l)
    if (!set.add(a)) false;
  true;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017083
Snippet name: allDifferent
Eternal ID of this version: #1017083/4
Text MD5: 43d81a2eb3a02718fcaddde5ce0d02d1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-11 20:46:48
Source code size: 150 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 382 / 416
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)