:1 and :3 are keywords, not numbers.

map literals are specified in terms of key-value pairs; for example, in {a b 
c d}, a and c are keys, b and d are values.  In your person struct, :1 is 
only used as a key once, which is why that works.  This might help make 
things clearer:

(struct person
        {:1
         "english person"
         
         [{:2 "Andrew D"
           [{:3 "father Andrew D"
             :3 "mother Lisa D"}]
           :2 "Justin M"
           [{:3 "Elisa M"}]}]
         :1
         
         "chinese person"
         [{:2 "Chi chi"}]
         })

In the first pair, :1 is the key, "english person" is the value.  In the 
second pair, the nested vector/map thing is the key, :1 is the value.  In 
the last pair, "chinese person" is the key, the vector containing a map is 
the value.

With all due respect, the questions you've posted to the list contain some 
misunderstandings about certain Clojure fundamentals.  May I suggest taking 
the time to work through a tutorial or book?  It will make life easier going 
forward.  There are many good choices to pick from, but this is one of my 
personal favorites:

http://java.ociweb.com/mark/clojure/article.html

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