Damian Conway wrote:


BTW, I am *sorely* tempted to suggest the following implementation instead:


    <snip>
which would produce:

    uniq <a b a a c d>;                          # <a b c d>

uniq { lc } <a b C A a c d>; # 'a'|'A', 'b', 'C'|'c', 'd'

    uniq { abs $^value } 42, 23, -23, 23, 42;    # 42, 23|-23

But I'd want to think through the ramifications a little more carefully before actually advocating something that correct. ;-)

uhm... okay. I can see the utility in having something like that around. But I think it's the kind of thing someone has to ask for, and that it likely shouldn't carry the name 'uniq'.

-- Rod Adams

Reply via email to