Re: Extending IFn

2011-10-28 Thread Sean Devlin
Eh, I was afraid the interface would be a problem. So there isn't a good way to reuse interface implementations for interacting w/ legacy Java quite yet. I do like your approach to the macro better. As usual you deliver, Meikel :) Sean On Oct 28, 3:11 am, "Meikel Brandmeyer (kotarak)" wrote:

Re: Extending IFn

2011-10-28 Thread Meikel Brandmeyer (kotarak)
Hi, since IFn is a Java interface and not a protocol, I'm afraid there is no better way to define this. However I would write the macro slightly differently. I find this more approachable. YMMV. (def max-arities 20) (defmacro definvokable [type fields & deftype-tail] (let [f(fields

Extending IFn

2011-10-27 Thread Sean Devlin
I'm experimenting with creating my own fn types. I was wondering if there was a better way of extending IFn than this: https://gist.github.com/1321330 Is there a more idiomatic way? -- You received this message because you are subscribed to the Google Groups "Clojure" group.