I am reading this tutorial on Haskell. They define function composition as the following:
(.) :: (b->c) -> (a->b) -> (a-
From the HaskellWiki page on function composition:
desort = (reverse . sort)
Now desort
is a function that sorts a list in reverse. Basically, desort
feeds it's arguments into sort
, and then feeds the return value from sort
into reverse
, an returns that. So it sorts it, and then it reverses the sorted list.