O'Reilly logo
  • Leandro Gonçalves de Oliveira thinks this is interesting:

1. Extend the full-moon-behavior multimethod to add behavior for your own kind of were-creature.

From

Cover of Clojure for the Brave and True

Note

(defmulti full-moon-behavior (fn [were-creature] (:were-type were-creature)))

(defmethod full-moon-behavior :crazy [were-creature] (str (:name were-creature) " is crazy and dangerous, very dangerous."))

(full-moon-behavior {:were-type :crazy :name "Dabura"})