> I'm somewhat of a beginner, and I've always been confused by the need for 
> vars *and* atoms. Now it's clear -- I've been misusing vars, via def and set!.

Exactly. I believe what you would want to have in that case is:

(def foo (atom 1))

which, in turn, allows to:

(reset! foo 2)

Also keep in  mind that you'll have to deref foo to get the stored value. e.g.:

(deref foo)
or simply just:
@foo

but I suppose you already knew that :)

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to