Skip to content

Instantly share code, notes, and snippets.

@drewr
Created November 12, 2009 19:58
Show Gist options
  • Save drewr/233223 to your computer and use it in GitHub Desktop.
Save drewr/233223 to your computer and use it in GitHub Desktop.
(defprotocol Foo
(baz [a]))
(defprotocol Bar
(baz [a]))
(extend String
Foo {:baz (fn [a] (.toUpperCase a))}
Bar {:baz (fn [a] (.toLowerCase a))})
(baz "QuUx") ; "quux"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment