not package:rio

Boolean "not"
O(n) notElem is the inverse of elem
notElem is the negation of elem.
O(log n). Is the key not a member of the map? See also member.
notMember 5 (fromList [(5,'a'), (3,'b')]) == False
notMember 1 (fromList [(5,'a'), (3,'b')]) == True
O(log n). Is the element not in the set?
O(n) Check if the vector does not contain an element (inverse of elem)
O(n) Check if the vector does not contain an element (inverse of elem)
O(n) Check if the vector does not contain an element (inverse of elem)
O(n) Check if the vector does not contain an element (inverse of elem)
Cn: Other, Not Assigned
_Nothing targets a () if the Maybe is a Nothing, and doesn't target anything otherwise:
>>> Just 1 ^.. _Nothing
[]
>>> Nothing ^.. _Nothing
[()]
It's not particularly useful (unless you want to use has _Nothing as a replacement for isNothing), and provided mainly for consistency. Implementation:
_Nothing f Nothing = const Nothing <$> f ()
_Nothing _ j       = pure j
O(n). mapKeysMonotonic f s == mapKeys f s, but works only when f is strictly monotonic. That is, for any values x and y, if x < y then f x < f y. The precondition is not checked. Semi-formally, we have:
and [x < y ==> f x < f y | x <- ls, y <- ls]
==> mapKeysMonotonic f s == mapKeys f s
where ls = keys s
This means that f maps distinct original keys to distinct resulting keys. This function has better performance than mapKeys.
mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")]) == fromList [(6, "b"), (10, "a")]
valid (mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")])) == True
valid (mapKeysMonotonic (\ _ -> 1)     (fromList [(5,"a"), (3,"b")])) == False
binotElem is the negation of bielem.
The isNothing function returns True iff its argument is Nothing.

Examples

Basic usage:
>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True
Only the outer constructor is taken into consideration:
>>> isNothing (Just Nothing)
False
O(n). The mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:
and [x < y ==> f x < f y | x <- ls, y <- ls]
==> mapMonotonic f s == map f s
where ls = toList s