isAnagram :: (String, String) -> Bool
isAnagram (str1, str2) = runST $ do
    ht :: HashTable s Char Int <- H.new
    mapM_ (flip (H.mutate ht) (f (+1))) str1
    mapM_ (flip (H.mutate ht) (f (+(-1)))) str2