null package:base
Test whether the structure is empty. The default implementation is
Left-associative and lazy in both the initial element and the
accumulator. Thus optimised for structures where the first element can
be accessed in constant time. Structures where this is not the case
should have a non-default implementation.
Examples
Basic usage:
>>> null []
True
>>> null [1]
False
null is expected to terminate even for infinite structures. The
default implementation terminates provided the structure is bounded on
the left (there is a leftmost element).
>>> null [1..]
False
Test whether a list is empty.
>>> null []
True
>>> null [1]
False
>>> null [1..]
False
The constant
nullFunPtr contains a distinguished value of
FunPtr that is not associated with a valid memory location.
The constant
nullPtr contains a distinguished value of
Ptr that is not associated with a valid memory location.
Test whether the structure is empty.
Examples
Basic usage:
>>> binull (18, 42)
False
>>> binull (Right 42)
False
>>> binull (BiList [] [])
True
Throw an
IOError corresponding to the current value of
getErrno if the
IO action returns
nullPtr, but
retry in case of an interrupted operation.
Guards against null pointers