Skip to content

Instantly share code, notes, and snippets.

@thomcc
Created January 12, 2012 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomcc/1603487 to your computer and use it in GitHub Desktop.
Save thomcc/1603487 to your computer and use it in GitHub Desktop.
sets problem
(def sets
{:vowel #{:a :e :i :o :u}
:consonant #{:b :c :d :f :g :h :j} ; ... etc.
:other #{:y}})
(defn categorize [thing]
(condp #(% %2) thing
(sets :vowel) :vowel
(sets :consonant) :consonant
(sets :other) :other
false))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment