Re: difficulties using extend--'elp!

2015-11-24 Thread William la Forge
Hi Steve! I deleted this post, but still it gets mailed out. Fixes are in and have been posted already. See "Reduces Reuse Coupling". But in any case, thanks. And thanks for the pointer to extend-type. :-) -- You received this message because you are subscribed to the Google Groups "Clojure"

difficulties using extend--'elp!

2015-11-24 Thread William la Forge
This is not working for me: (ns aatree.record-play) (defprotocol gran (blip [x y z])) (defrecord wackel []) (defn new-wackel [opts] (let [w (->wackel)] (into w opts) (assoc w :blip (fn [this x y z] (+ x y z) (extend wackel gran {:blap (fn [this x y z] ((:blip

Re: difficulties using extend--'elp!

2015-11-24 Thread Stephen Gilardi
There are a several small things here that need fixing: - in the “gran” section of your “extend”, you’re defining “blap” which is not part of the gran protocol - perhaps blip was intended - the first argument in protocol function declarations refers to the object itself, often named “this” -