Moreover, now the exception thrown when the validation fails is not very informative!

IllegalStateException Invalid reference state clojure.lang.ARef.validate (ARef.java:33)

assert let's you speciy the message you want that is why I preferred it...

Jim





On 21/02/13 14:56, Jim foo.bar wrote:
Yes you're right, this does the trick...However now I've ended up unquoting 'name' 3 times! I'm pretty sure this not a good practice in general, is it? On the other hand I cannot use 'gensym' cos I want the name intact or later access...hmmm...I never expected this would be so confusing!

Jim


On 21/02/13 14:52, Meikel Brandmeyer (kotarak) wrote:
Then simply add a (var ~name) as last statement in the do.

Kind regards
Meikel

--
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
--
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
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to