On Sun, Feb 13, 2011 at 7:00 PM, Seth <wbu...@gmail.com> wrote:
> Cool, thats what I thought. Sometimes, i wish i could inherit from a
> class, but then i just use proxy to do it instead :) For example, i
> made a function which acted like a fn? , but had some metadata. At
> first i was going to use records, but couldnt because i needed to
> inherit from Afn, but proxies worked beautifully!

If you controlled the testing code, could you have used ifn? instead
of fn?, or would ifn? returning true on things like vectors, maps, and
sets have caused a problem?

The ifn? function tests only for the interface IFn, which deftype can
be used to implement (and defrecord implements by default as map
lookup).

-- 
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