On 7 February 2010 16:10, Robert Campbell <rrc...@gmail.com> wrote:
> Imagine a map m {
> [ snip ]
> }
>
> How could I transform that into a seq s (
> [ snip ]
> )

To answer this part of the question:

You could (use 'clojure.contrib.combinatorics) (for cartesian-product), then do

(map #(interleave (keys coordinates) %)
  (apply cartesian-product (vals coordinates)))

Note that you could parametrise it to make it into a function -- no
macro needed here.

Sincerely,
Michał

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