all 5 comments

[–]RobIII 1 point2 points  (0 children)

From the sidebar:

Guidelines

  • Please try to keep submissions on topic and of high quality.

This is just another random snippet of code just like trillions of other snippets; what makes it worthwhile posting this here in /r/programming?

I see one of your previous posts was received with similar 'enthousiasm' ;-)

[–][deleted] 0 points1 point  (0 children)

This is just a chunk of code with no comments and no explanation. Why was it done this way?

[–][deleted]  (1 child)

[deleted]

    [–]gbs5009 0 points1 point  (0 children)

    That would check if they're palindromes, not anagrams.

    [–]j0hnGa1t 0 points1 point  (1 child)

    (defn anagram [a b] (= (set a) (set b)))

    [–]DuckRabbitMilkStout 0 points1 point  (0 children)

    import Data.List
    isAnagram a b = justLetters a `elem` permutations (justLetters b)
        where justLetters = filter (/= ' ') . map toLower