Skip to content

Instantly share code, notes, and snippets.

@andrewmcnamara
Last active January 3, 2016 18:39
Show Gist options
  • Save andrewmcnamara/8503360 to your computer and use it in GitHub Desktop.
Save andrewmcnamara/8503360 to your computer and use it in GitHub Desktop.
(defn is_anagram?
[word anagram]
(and (= (.length anagram) (.length word)) (empty? (clojure.set/difference (set word) (set anagram)))))
(filter (partial is_anagram? "yellow") ["yellow" "lowyelq"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment