Damian Conway wrote:
> Moritz Lenz wrote:
> 
>> There are some tests for List.uniq in the test suite, and pugs
>> implements it, but it's not in S29.
>> Damian seems to have though we should have it.
>> So should we have it? 
> 
> I still think we should. If only because I've seen it re-(mis)-implemented so 
> many times.
> 
> I'd also suggest that it have the same interface as .sort. Namely that you 
> can 
> pass a block to specify either a unary key-extractor or a binary comparator 
> function.

I like the idea with an unary function, but I have my doubts with the
two arg comparison function, because it implies O(n²) runtime. But then
again if the user needs that, he'd have to implement it in O(n²) anyway...

Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/ |  http://perl-6.de/

Reply via email to