for simplicity, first tried to create two dimentional array(vector) of
numbers.
On Feb 5, 1:58 am, Emeka emekami...@gmail.com wrote:
Where did 'ref' go in your own implementation?
Emeka
--~--~-~--~~~---~--~~
You received this message because you are subscribed
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
are they really equivalent?
Looks like they are but...
Also I was trying to decompose...
user= (def x (apply vector (map (fn [_] 1) (range 3
#'user/x
user= x
[1 1 1]
user= (apply vector (map (fn [_] x) (range 3)))
[[1 1 1] [1 1 1] [1 1 1]]
and now it makes a lot more sense...
On Feb 5,
Where did 'ref' go in your own implementation?
Emeka
--~--~-~--~~~---~--~~
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
Wow, thanks wwmorgan! I too was struggling to have some semblance of
intuition on the first form, but this one is much easier.
Duane
On Feb 4, 10:19 pm, wwmorgan wmorga...@gmail.com wrote:
Here's what I came up with: is it any clearer?
(def board
(vec (for [i (range dim)]