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

10
LINES

< > BotCompany Repo | #1006315 // uniquifyList - keep order & remove duplicates

JavaX fragment (include)

static <A> L<A> uniquifyList(Collection<A> l) {
  if (l == null) null;
  if (l(l) < 2) ret asList(l);
  new HashSet<A> set;
  new L<A> out;
  for (A a : l)
    if (set.add(a))
      out.add(a);
  ret out;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006315
Snippet name: uniquifyList - keep order & remove duplicates
Eternal ID of this version: #1006315/3
Text MD5: 61749e2c0dcd81fb33900d42235daa99
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-13 19:07:37
Source code size: 215 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 627 / 649
Version history: 2 change(s)
Referenced in: [show references]