This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (ice-9 common-list) `uniq' replacement


thi <ttn@revel.glug.org> writes:

> this version of `uniq' doesn't overflow the default guile stack like the
> one in (ice-9 common-list) does for very large inputs.

Thanks!  I have applied this.

> the `reverse' is habitual, feel free to omit it...

Returning the result list in the same order as the input list is a
good thing.  I have changed your `reverse' to `reverse!' because the
list is freshly consed and nobody will get confused by reversing it in
place.  I also used `(null? l)' in place of `(eq? '() l)'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]