Yes it works ! :
1:172 user=> (doto (java.awt.Point.) (-> .x (set! 2)))
#
I hadn't thought about this possible combination, thanks Meikel.
So now, is mset! worth the trouble ?
Let's compare them again:
(doto (SomeBeanCtor.)
(-> .field1 (set! expr1))
(-> .field2 (set! expr2))
(-> .field4 (s
Hi,
Am 23.07.2009 um 18:24 schrieb Laurent PETIT:
Hello,
I want to call set! several times on a same instance, e.g. :
(let [instance (SomeBeanCtor.)]
(set! (. instance field1) expr1)
(set! (. instance field2) expr2)
...)
Do you know if a macro simplifying this already exists ?
How abo
Hello,
I want to call set! several times on a same instance, e.g. :
(let [instance (SomeBeanCtor.)]
(set! (. instance field1) expr1)
(set! (. instance field2) expr2)
...)
Do you know if a macro simplifying this already exists ?
Anyway, I've created one as an exercise, and here it is:
(def