On 2012-07-09 18:07 , "Herwig Hochleitner" <hhochleit...@gmail.com> wrote:

>> (I had written):
>> So is there a way to do it cleaner without resorting to using the
>> map/implementation (detail) form of protocol extension?
>
>Currently, there is no way to get the implementing fns for a
>type-protocol point. I doubt there will be soon, since clojure compiles
>implementations in a deftype/record or reify directly to java methods on
>the generated class.
>
>
>There is a way, however, to supply fns as implementations for a
>type-protocol point, i.e. extend
>
>
>(extend SomeOps MImp {:someop (memoize (fn [me] ...))})

Yep, I was aware of that option but I find it less aesthetically pleasing.
This and/or declaring a single private def with a lambda inside will do
for the time being, though.

Thanks,
-Martin

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to