Skip to content

Instantly share code, notes, and snippets.

@fogus
Created February 7, 2011 14:17
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 fogus/814421 to your computer and use it in GitHub Desktop.
Save fogus/814421 to your computer and use it in GitHub Desktop.
(def H (derive (make-hierarchy) ::linux ::unix))
(defmulti home identity :hierarchy H)
(defmethod home ::unix [os] "/home")
(home ::unix)
;=> "/home"
(home ::linux)
;=> "/home"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment