You can get the latest builds from http://build.clojure.org

As for for problem, it is a near certainty that it's not a bug in
clojure, and instead something is either alter/assoc'ing stuff onto
the map held by global-ref-map2 or something is ref-set'ing local-ref-
map1''s map onto global-ref-map2.

On Jun 6, 2:54 pm, Allan Moore <a...@telusplanet.net> wrote:
> 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 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

Reply via email to