:: a -> Set a -> Set a -package:distribution-opensuse

O(log n). Insert new value into a set where values are strictly greater than the new values That is, the new value must be strictly less than all values present in the Set. /The precondition is not checked./ While this has the same asymptotics as Data.Set.insert, it saves a constant factor for value comparison (so may be helpful if comparison is expensive) and also does not require an Ord instance for the value type.
O(log n). Insert new value into a set where values are /strictly less than the new value. That is, the new value must be strictly greater than all values present in the Set. The precondition is not checked./ While this has the same asymptotics as Data.Set.insert, it saves a constant factor for value comparison (so may be helpful if comparison is expensive) and also does not require an Ord instance for the value type.
O(n) Prepend an element.
O(n) Prepend an element
Insert an element in a set. If the set already contains an element equal to the given value, it is replaced with the new value.
Delete an element from a set.
O(log n). Insert an element in a set. If the set already contains an element equal to the given value, it is replaced with the new value.
O(log n). Delete an element from a set.
Append an element to the end of a Set
Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version.

Examples

Perform a computation with Maybe and replace the result with a constant value if it is Just:
>>> 'a' <$ Just 2
Just 'a'

>>> 'a' <$ Nothing
Nothing
Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version. Using ApplicativeDo: 'a <$ bs' can be understood as the do expression
do bs
pure a
with an inferred Functor constraint.
Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version.
Cons element to the vector
Append element to the vector
Insert a new element into the collection. Since the Set type does not allow duplicates, inserting an element already in the collection has no effect.
Remove an element from the collection if present.
scale a vector by a scalar
Compute the left scalar product
>>> 2 *^ V2 3 4
V2 6 8
Add a value to the set. When the value is already an element of the set, it is replaced by the new one, ie. insert is left-biased.
Delete a value in the set. Returns the original set when the value was not present.