On Mon, Jun 27, 2011 at 1:10 AM, Antonio Recio <amdx6...@gmail.com> wrote:
> I would like to create an struct with the names of differents nationalities.
> When people are the same nationality I would don't need to repeat again the
> nationality. Is there any way t0 get that. For example, I would like to
> write something like that:
> (defstruct person :nationality :first :last)
> (def people (struct person  "english" "Jim"
>                                                      "Silvester"
>                                                      "Stephen" "Howards"
>                                        "chinese" "Chiu" "Chiu"))

You probably want something more like a map like this:

{:english [{:first "Jim" :last "Silvester"}
           {:first "Stephen" :last "Howards"}]
 :chinese [{:first "Chiu" :last "Chiu"}]}

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

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