I'm trying to make a bunch of agents. Individually, one can do:
(def myAgent (agent 3))
But if I want to make a lot of agents, how can I assign both names and values to the agent in an anonymous function? I have this:
(def agents (vec (map agent (range 0 50)) ))
Which makes 50 agents, but none of them have a value. When I try an anonymous function:
(def agents (vec (map (fn [x] (def x (agent 3)) (range 0 50)) ))
It doesn't work. Any help would be greatly appreciated.