(dosync
    (alter local-ref-map1 assoc stuff stuff-struct))
(assert (not (@global-ref-map2 stuff)))

so this asserts that the global map dosent hawe something bound to
the key of what stuff is refering to.

from this code i dont se what the data from link comes from
or how its related to the global referenses passed in
culd you paste the actual code in http://gist.github.com/ and post a link?

to get 1.2 clojure if your on a unix system type

git clone http://github.com/richhickey/clojure.git
cd clojure
ant

and you whill get a jar

2010/6/6 Allan Moore <a...@telusplanet.net>

> 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<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en




-- 
------------------------------------------------
Nick: Korre
Email: patrik.kar...@gmail.com
------------------------------------------------

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