Skip to content

Instantly share code, notes, and snippets.

@the-frey
Created September 12, 2019 14:03
Show Gist options
  • Save the-frey/2fd0d9f33eb535f0727ff3a1dbddd3c5 to your computer and use it in GitHub Desktop.
Save the-frey/2fd0d9f33eb535f0727ff3a1dbddd3c5 to your computer and use it in GitHub Desktop.
(defmulti multimethod
(fn [opt-one opt-two] opt-one))
(defmethod multimethod :path-one [_ opts]
(println (:first-opt opts)))
(defmethod multimethod :path-two [_ opts]
(println (:second-opt opts)))
(multimethod :path-one {:first-opt 1
:second-opt 2})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment