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

9
LINES

< > BotCompany Repo | #1004283 // listMinus - list minus some elements

JavaX fragment (include)

static <A> L<A> listMinus(Collection<A> l, O... stuff) {
  if (l == null) null;
  L l2 = similarEmptyList(l);
  Set set = lithashset(stuff);
  for (O o : l)
    if (!set.contains(o))
      l2.add(o);
  ret l2;
}

Author comment

Began life as a copy of #1004210

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004283
Snippet name: listMinus - list minus some elements
Eternal ID of this version: #1004283/4
Text MD5: 96d1e018d5283416bfa9a54e71fe730c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-20 15:18:20
Source code size: 219 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 623 / 581
Version history: 3 change(s)
Referenced in: [show references]