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: 708 / 668
Version history: 3 change(s)
Referenced in: #1005269 - setMinus - set minus some elements
#1006092 - listMinusList - list minus some elements
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011633 - listMinusIC - list minus some elements
#1023714 - listMinusElementIC - list minus an element
#1030742 - listMinusItem - list minus a single item