Answers for "sortOn haskell"

0

sortOn haskell

sortOn :: Ord b => (a -> b) -> [a] -> [a] 
>>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]
Posted by: Guest on January-12-2022

Browse Popular Code Answers by Language