My approach (which I might upload once I've tidied it up a bit) was to use a hash-map of [x y] cell coordinates to a set of all remaining numbers. So, something like:
{[0 0] #{1 2 3 4} [0 1] #{5 6 7 8} …} Then I just made some functions that mapped an [x y] pair to all it's peers -- e.g. unit, row, col (which were generated by another function.) I memoized those functions. The only hassle with a map is that iterating over it (in my case, with a `for`) turns it into a list of [key value], which makes it a pain to turn back into a map once you're done. The magical incantation for round-tripping turns out to be: (apply hash-map (apply concat seq-of-pairs)) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---