The least element of a non-empty structure. This function is
equivalent to
bifoldr1 min, and its behavior on
structures with multiple least elements depends on the relevant
implementation of
min. For the default implementation of
min (
min x y = if x <= y then x else y), structure
order is used as a tie-breaker: if there are multiple least elements,
the leftmost of them is chosen (this is equivalent to
biminimumBy compare).
Examples
Basic usage:
>>> biminimum (42, 17)
17
>>> biminimum (Right 42)
42
>>> biminimum (BiList [13, 29, 4] [18, 1, 7])
1
>>> biminimum (BiList [13, 29, 4] [])
4
On empty structures, this function throws an exception:
>>> biminimum (BiList [] [])
*** Exception: biminimum: empty structure
...