>>> minimumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"] "!"WARNING: 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.