>>> maximum [1..10] 10
>>> maximum [] *** Exception: Prelude.maximum: empty list
>>> maximum Nothing *** Exception: maximum: empty structureWARNING: This function is partial for possibly-empty structures like lists.
>>> maximumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"] "Longest"WARNING: This function is partial for possibly-empty structures like lists.
>>> bimaximum (42, 17) 42
>>> bimaximum (Right 42) 42
>>> bimaximum (BiList [13, 29, 4] [18, 1, 7]) 29
>>> bimaximum (BiList [13, 29, 4] []) 29On empty structures, this function throws an exception:
>>> bimaximum (BiList [] []) *** Exception: bimaximum: empty structure ...
>>> bimaximumBy compare (42, 17) 42
>>> bimaximumBy compare (Left 17) 17
>>> bimaximumBy compare (BiList [42, 17, 23] [-5, 18]) 42On empty structures, this function throws an exception:
>>> bimaximumBy compare (BiList [] []) *** Exception: bifoldr1: empty structure ...