Skip to content

Instantly share code, notes, and snippets.

@radhikalism
Created October 2, 2009 23:31
Show Gist options
  • Save radhikalism/200252 to your computer and use it in GitHub Desktop.
Save radhikalism/200252 to your computer and use it in GitHub Desktop.
(defmulti foo (fn [a & more] a))
(defmethod foo :bar
([a] (println "a 1"))
([a b] (println "a 2")))
(comment
> (foo :bar)
a 1
nil
> (foo :bar :baz)
a 2
nil
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment