Hi,

Adriano Ferreira wrote:
> quoting Damian's original mail[1]:
>>  uniq      - remove duplicates without reordering
>                                 ^^^^^^^^^^^^^^^^^^
> 
> Would not that mean the original order of the first ocurrence is
> preserved? This is what Ruby Array#uniq does:
> 
> [4,1,2,4,2,3,5].uniq  => [ 4, 1, 2, 3, 5]

I read this as that uniq should behave like Unix's uniq(1), i.e.
removing only successive duplicates, e.g.:
  uniq [3,3,3,4,3]   =>   [3,4,3]   # what I meant
  uniq [3,3,3,4,3]   =>   [3,4]     # what you meant

(But I'd be fine with either behaviours.)


--Ingo

-- 
Linux, the choice of a GNU | Row, row, row your bits, gently down the
generation on a dual AMD   | stream...  
Athlon!                    |

Reply via email to