On Mar 5, 7:50 pm, James Reeves <[email protected]> wrote:
> (apply map merge
> (for [k (keys m)]
> (for [v (.split (m k) " ")]
> {k v}))))
On reflection, I think this should be
(apply map merge
(for [k (keys (first m))]
(for [v (.split (m k) " ")]
{k v})))
Also, this assumes each map has the same keys, and each value has the
same number of "words".
- James
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en