2013/10/28 Jiaqi Liu <liujiaq...@gmail.com>

> i really don't get it.
> Any suggestion??
>

Clojure data structures are immutable. clojure.core/assoc
produces a new data structure instead of changing the one you have.

You can use an atom if you need to update a map from doseq
but more likely you want to use the actual value assoc returns
and/or clojure.core functions for manipulating collections,
such as clojure.core/reduce.

See http://clojure-doc.org/articles/language/core_overview.html,
http://clojure-doc.org/articles/language/collections_and_sequences.html
and
http://clojure-doc.org/articles/language/concurrency_and_parallelism.html
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

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