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 | } |
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: | 441 / 559 |
| Referenced in: | [show references] |