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

6
LINES

< > BotCompany Repo | #1036546 // uniquifyInPlace - remove duplicates from list in-place

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (389L/3K).

static <A> L<A> uniquifyInPlace(L<A> l) {
  var l2 = uniquify(l);
  if (l(l2) < l(l))
    replaceList(l, l2);
  ret l;
}

Author comment

Began life as a copy of #1006315

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036546
Snippet name: uniquifyInPlace - remove duplicates from list in-place
Eternal ID of this version: #1036546/1
Text MD5: 10854afbe28888c77a892fd32614e7f3
Transpilation MD5: 83f200afe83c674727c9e12f2d039739
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-02-12 16:27:10
Source code size: 125 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 69 / 98
Referenced in: [show references]