> Your input isn't a legal Clojure form, and the correlation between
> input and output is difficult to spot, so it is hard to guess what you
> mean.

Sorry about the malformed map, a correctly formed map follows:

 {"a" {2011 [["a" 2011 "ari"] ["a" 2011 "dan"]], 2010 [["a" 2010
"jon"]]}}

Now as for the correlation: the original map is a two-tier map with
the key "a" on the first tier and keys 2011 and 2010 on the second.
The goal is to collapse the map keys into composite keys and create
new flat maps, i.e.

( { [a 2011] [ ["a" 2011 "ari"] ["a" 2011 "dan"] ] } , { [a 2010]
[ ["a" 2010 "jon"] ] } )

Let's examine the first map in the above sequence of maps.

[a 2011] is a composite key derived from the tiered keys:
{"a" { 2011 .... }}
[ ["a" 2011 "ari"] ["a" 2011 "dan" ] ] is the value corresponding to
the above tiered keys.

Now let's examine the second map in the above sequence of maps.

[a 2011] is a composite key derived from the tiered keys: {"a" { ... ,
2010 }}
[ ["a" 2010 "jon"] ] is the value corresponding to the above tiered
keys.

> Try a simpler example, preferably with less repetition of
> similar-looking values.

Unfortunately, the repetition of identical or similar values is a part
of the problem set; essentially, the keys themselves are values which
are contained in the corresponding nested value, i.e.

{"a" { ... , 2010 [ ["a" 2010 "jon"] ] } }

Notice how the nested vector contains both "a"and 2010.

Thanks for the help. Hope my clarifications make the problem clearer;
let me know if any more information/clarification is needed.

Regards,
Ari

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