Closed ruricolist closed 5 years ago
Leaning towards collapse-repeats
for consistency with collapse-whitespace
.
Actually there should be two functions: collapse-runs
, which takes a one-argument predicate, and collapse-repeats
, which takes a two-argument predicate.
It would be nice to have a utility that does what
uniq
does on the command line -- eliminate adjacent repetitions. Obviously it would better thanremove-duplicates
(ornub
) for data that is already sorted. But:uniq
is a terrible name.Candidates:
first-elt
over the result ofruns
)