Is it really necessary to have the keys :data and :children? If not:

(reduce (fn [r x] (assoc-in r x {})) {} (partition 3 '(A1 B1 C1 A1 B1 C2 A1
B2 C3 A1 B2 C4 A2 B3 C5 A2 B3 C6 A2 B4 C7 A2 B4 C8)))
{A2 {B4 {C8 {}, C7 {}}, B3 {C6 {}, C5 {}}}, A1 {B2 {C4 {}, C3 {}}, B1 {C2
{}, C1 {}}}}

Works out pretty well.

On Mon, Jun 21, 2010 at 10:55 PM, Base <basselh...@gmail.com> wrote:

> A1      B1      C1
>        A1      B1      C2
>        A1      B2      C3
>        A1      B2      C4
>        A2      B3      C5
>        A2      B3      C6
>        A2      B4      C7
>        A2      B4      C8
>

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