I have a problem in my program. When I add something to a map, it
also seems to get added to a completely different map. I catch the
error with an assert on the line immediately following so there isn't
much room for my program to do something wrong. The program does
quite a bit of processing of the global variables before this point in
the code. I am using Clojure 1.1. Does anybody know of a known bug
in Clojure that might cause this problem? Any advice on how to fix
it? Also, how can I get a copy of version 1.2 to see if it fixes the
problem? I would be grateful for any help. The code looks like this:
(defn foo [ link global-ref-map1 global-ref-map2 global-ref-map3
count ]
(let [ stuff (:tag link)
local-ref-map1 (ref {})
local-ref-map2 (ref {})
local-ref-map3 (ref {})
local-ref-map4 (ref {})
stuff-struct (struct bar stuff nil nil :label) ]
(println "debugging line")
(if ...condition... )
(do
(println "test true, stuff = " stuff)
(dosync
(alter local-ref-map1 assoc stuff stuff-struct))
(assert (not (@global-ref-map2 stuff)))
...
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en