Implement solution to anagram problem in Haskell.