Apply a function to each element, returning any other valid
ListLike. rigidMap will always be at least as fast, if
not faster, than this function and is recommended if it will work for
your purposes. See also mapM.
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