O(log n) Convert a
Set into an
NESet by adding a
value where the value is
strictly less than all values in the
input set The values in the original map must all be
strictly
greater than the new value.
The precondition is not
checked.
While this has the same asymptotics as
insertSet, it saves a
constant factor for key comparison (so may be helpful if comparison is
expensive) and also does not require an
Ord instance for the
key type.
insertSetMin 7 (Data.Set.fromList [5, 3]) == fromList (3 :| [5, 7])
valid (insertSetMin 7 (Data.Set.fromList [5, 3])) == True
valid (insertSetMin 2 (Data.Set.fromList [5, 3])) == False
valid (insertSetMin 5 (Data.Set.fromList [5, 3])) == False