Warning: session_start(): open(/var/lib/php/sessions/sess_5f3pga68kulqkk3l17c965sbtt, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
uniquifyInPlace - remove duplicates from list in-place [1036546]

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).

1  
static <A> L<A> uniquifyInPlace(L<A> l) {
2  
  var l2 = uniquify(l);
3  
  if (l(l2) < l(l))
4  
    replaceList(l, l2);
5  
  ret l;
6  
}

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: 615 / 752
Referenced in: [show references]