map_unique function

Run a function on unique values of a iterable