Data.Set function mapSetMonotonic consider harmful...?
Data.Set the function
mapSetMonotonic is defined as a straightforward function that maps a function over the elements in the set:
mapSetMonotonic :: !(a -> b) !(Set a) -> Set b mapSetMonotonic _ Tip = Tip mapSetMonotonic f (Bin n x l r) = Bin n (f x) (mapSetMonotonic f l) (mapSetMonotonic f r)
However, this easily violates the ordering property of the resulting set, for instance use
mapSetMonotonic (~). Is this function actually used? Shouldn't it be removed, or at least be documented with a warning?