Sorry for the easy question it's just I'm extremely new to haskell..
I'm trying to write a function "order" which will sort a list of tuples produced by another function "frequency" (frequency counts the number of distinct elements in a list a gives one such result, say > frequency "aabbbccc", would incur the result, [(2,a),(3,b),(3,c)]) into ascending order. I can't work out how to write it.
If I write >sort (frequency score) into the prelude it will sort it (score being a list of grades, i.e ["a", "b", "c", "c"].
But when I try to write a function..
results :: [a] -> [(Int, a)]
results = sort (frequency score)
It sadly does not work saying that sort is applied to too many arguments.
Sorry for the obvious question and thanks in advance.