uniqList
lib.misc.uniqList
Docs pulled from | This Revision | 10 minutes ago
Deprecated
This function has O(n^2) performance.
Noogle detected
Implementation
The following is the current implementation of this function.
uniqList =
{
inputList,
acc ? [ ],
}:
let
go =
xs: acc:
if xs == [ ] then
[ ]
else
let
x = head xs;
y = if elem x acc then [ ] else [ x ];
in
y ++ go (tail xs) (y ++ acc);
in
go inputList acc;