对于Array/List,似乎没有直接实现uniq或uniqBy过滤器
["val1", "val2", "val1"] -> ["val1", "val2"]
["val1", "val2", "val1"]
["val1", "val2"]
["key1" /\ 1, "key2" /\ 10, "key1" /\ 20] -> ["key1" /\ 1, "key2" /\ 10]
["key1" /\ 1, "key2" /\ 10, "key1" /\ 20]
["key1" /\ 1, "key2" /\ 10]
有很多方法可以做到这一点,但在性能/简单性方面,首选/更好的方法是什么?