Re: Uniq list in Guile

2013-10-26 Thread Ludovic Courtès
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"

Re: Uniq list in Guile

2013-10-26 Thread Dmitry Bogatov
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

Re: Uniq list in Guile

2013-10-26 Thread Ian Price
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 l

Re: Uniq list in Guile

2013-10-26 Thread Thien-Thi Nguyen
() 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-

Re: Uniq list in Guile

2013-10-26 Thread Panicz Maciej Godek
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(

Uniq list in Guile

2013-10-26 Thread Dmitry Bogatov
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