Data.List: max_by/min_by throw an exception if the list is empty
Data.List: modify spec of foldl1/foldr1