You don't need a sort to find the top element

Trying this in ghci, 'compare' is already pulled in by prelude. This change is closer to Norvig's python implementation ("return max(candidates, key=NWORDS.get)")  but also removes a needless sort - if you just need the maximum, an O(n) single pass is all you need, not an O(n logn) sort.