On 07/10/2012 06:40 PM, Jacob Carlborg wrote:
On 2012-07-10 16:54, Andrei Alexandrescu wrote:Actually I take that back. One may use uniq to remove duplicates in unsorted ranges.How does that work? It didn't work in my example.
It works. It removes consecutive duplicates. 'uniq' in ruby is different, which is strange as the name was taken from the command-line facility. (that also removes consecutive duplicates)