Here's what I came up with: is it any clearer? (def board (vec (for [i (range dim)] (vec (for [j (range dim)] (ref (struct cell white)))))))
On Feb 4, 11:30 pm, wubbie <sunj...@gmail.com> wrote: > Hi, > > Have some difficulties in reasoning about it. > From ants.clj, > (def board > (apply vector > (map (fn [_] > (apply vector > (map (fn [_] (ref (struct cell white))) > (range dim)))) > (range dim)))) > > Is there any simpler two dimentional array construct which would be > easiler to grasp? > > thanks, > -sun --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---