Re: combining methods

2009-08-08 Thread Meikel Brandmeyer
Hi, Am 07.08.2009 um 20:55 schrieb Andy Chambers: Does clojure have an equivalent of either CLOS's `call-next-method' or java's super? You can use get-method. (derive ::Foo ::Bar) (derive ::Foo ::Frob) (defmulti do-something type) (defmethod

combining methods

2009-08-07 Thread Andy Chambers
Hey All, Does clojure have an equivalent of either CLOS's `call-next-method' or java's super? For example, given the multi-method, and the interfaces ICDISCElement and IODMDef, where IODMDef extends ICDISCElement (defmulti validate class) (defmethod validate ICDISCElement [elem]

Re: combining methods

2009-08-07 Thread Stuart Sierra
There isn't an equivalent right now. The simplest workaround is to factor out the common code into an ordinary function, and call it from your multimethods. -SS On Aug 7, 2:55 pm, Andy Chambers achambers.h...@googlemail.com wrote: Hey All, Does clojure have an equivalent of either CLOS's