Ian Price skribis:
>> Hello!
>>
>> Recently I faced neseserity to uniq list in Guile. Surprised, that I
>> did not found ready solution, I decided to prepare it.
> It's not really that common.
+1 (I’ve never needed it, FWIW.)
> I wrote my own "uniq" (which is a terrible name unix has inflicted
Thien-Thi Nguyen writes:
>There's also a "delete-duplicates" function available that comes with
>SRFI-1.
>
> See also ‘(ice-9 common-list) uniq’, which hardcodes ‘eq?’ comparison
> (via ‘memq’). I, too, think it's better to not add this as a
> primitive.
Thanks for replies. These functi
Dmitry Bogatov writes:
> Hello!
>
> Recently I faced neseserity to uniq list in Guile. Surprised, that I
> did not found ready solution, I decided to prepare it.
It's not really that common. I wrote my own "uniq" (which is a terrible
name unix has inflicted on us) a long while back, and I think I
() Panicz Maciej Godek
() Sat, 26 Oct 2013 10:03:44 +0200
There's also a "delete-duplicates" function available that comes with
SRFI-1.
See also ‘(ice-9 common-list) uniq’, which hardcodes ‘eq?’ comparison
(via ‘memq’). I, too, think it's better to not add this as a primitive.
--
Thien-
There's also a "delete-duplicates" function available that comes with
SRFI-1.
It has a different behaviour, because it uniques the whole list, not just
the groups of adjacent elements, and is a pure function, but usually can be
used to achieve the desired effect.
The manual claims that it has an O(
Hello!
Recently I faced neseserity to uniq list in Guile. Surprised, that I
did not found ready solution, I decided to prepare it.
By analogy with sorting functions in `sort.c` I prepared
`uniq.c`(attached, but unfinished patch, lacking proper documentation).
But after I became curious, how slow