Craft an anagram detector.