Clojure multimethods

Clojure multimethods

Post by Mike Austi » Fri, 26 Dec 2008 04:34:29

Does anyone know of a reference that has examples of multimethods in Clojure,
specifically relating to argument attributes and validation?

"Clojure multimethods are not hard-wired to class/type, they can be based on
any attribute of the arguments, on multiple arguments, can do validation of
arguments and route to error-handling methods etc."

Does this mean you could dispatch on "argument size > 0". Wouldn't that be
considered predicate dispatching, a more general form of multimethods?