O(n*min(n,W)). map f s is the set obtained by
applying f to each element of s.
It's worth noting that the size of the result may be smaller if, for
some (x,y), x /= y && f x == f y
O(n*log n). map f s is the set obtained by
applying f to each element of s.
It's worth noting that the size of the result may be smaller if, for
some (x,y), x /= y && f x == f y