Ingo Blechschmidt wrote:
Hi,
three quick questions:
Since Aaron is still getting up to speed, I'll take a stab at these.
Is it intentional that there's no uniq in the current S29[1] draft?
See [2] for Damian saying that uniq is probably in.
Just hasn't been entered.
I wondered what uniq's default comparator should be, =:=?
I'd have gone with ~~
Should it be possible to give an own comparator block, similar as with
grep? E.g.
uniq <a b a a c d>; # <a b a c d>
uniq:{ abs $^a == abs $^b } 42, 23, -23, 23, 42
# 42, 23, 42
I could see that happening. But I'd have to stop and wonder if wrapping
it inside a map would be more natural. If it does happen, it'd likely
need to copy the key generation style of the new sort.
-- Rod Adams