One side node, *repeatedly* produces a lazy-seq. Since the REPL forces that
seq when it tries do print everything you get the desired results, but if
you were to
(def x (repeatedly 1000 addmod)
and then inspects mobs it would be empty, since no one forced the seq. If
you want to force side-eff
Awesome, thanks a lot!
On Wednesday, July 17, 2013 11:19:06 AM UTC+2, puzzler wrote:
>
> This might help:
> http://clojuredocs.org/clojure_core/clojure.core/*print-length*
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s
This might help:
http://clojuredocs.org/clojure_core/clojure.core/*print-length*
--
--
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
Hello everyone,
I have a ref, which is a hashmap of monsters (they key is a unique id, the
value is the monster) like this:
*(defrecord mob [name level hp-cur hp-max])
(def mobs (ref {}))
(defn addmob []
(dosync (alter mobs assoc (gen-id) (->mob "test" 1 2 3)))*
Now if I add 1000 monsters, li