Re: Feedback for a visitor closure generator

2009-11-23 Thread John Harrop
On Mon, Nov 23, 2009 at 2:26 PM, Sean Devlin wrote: > * Back to Multimethods * > > The power of the individual closures can be amplified when wrapped in > a multimethod. Consider our String/Symbol/Keyword group. > > (defmulti visit-string (fn [& args] (second args)) > > (defmethod visit-string cl

Feedback for a visitor closure generator

2009-11-23 Thread Sean Devlin
Multimethods are a great abstraction in Clojure. They are great for adapting a wide variety of inputs to a function. However, I often need to decouple the adaptation of data from the function that operates on the adapted data. Also, after the work is complete, I need to adapt the data back to th