Re: Protocol functions & higher order functions

2011-04-06 Thread David McNeil
> I think not a bug. If you want indirection in your wrapper, you can ask for > it, e.g.: > >  (defn wrap [f] >    (fn [& args] >      (apply @f args))) > >  (def wrapped-x (wrap #'x)) Thank you! -David -- You received this message because you are subscribed to the Google Groups "Clojure" group

Re: Protocol functions & higher order functions

2011-04-06 Thread Stuart Halloway
> The following code shows surprising behavior related to using protocol > functions in higher order functions. I sort of understand the reason > wrapped-x first fails is that calling extend-protocol in a sense > redefines the x protocol function. I can't decide if I think this is a > bug or just t

Protocol functions & higher order functions

2011-04-06 Thread David McNeil
The following code shows surprising behavior related to using protocol functions in higher order functions. I sort of understand the reason wrapped-x first fails is that calling extend-protocol in a sense redefines the x protocol function. I can't decide if I think this is a bug or just the way pro