>>> 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.
maxView (fromList [(5,"a"), (3,"b")]) == Just ("a", singleton 3 "b")
maxView empty == Nothing
maxViewWithKey (fromList [(5,"a"), (3,"b")]) == Just ((5,"a"), singleton 3 "b") maxViewWithKey empty == Nothing