a bit of the anagram problems, but also exercises from chapter2 of functional programming in scala