I'd write it as (repeatedly num-raindrops #(agent nil)).

On Apr 3, 5:27 pm, Sean Corfield <[email protected]> wrote:
> On Sun, Apr 3, 2011 at 4:31 PM, carinmeier <[email protected]> wrote:
> >  (let [rainagents (vec (repeat num-raindrops (agent nil)))]
>
> Wouldn't that create a vector with N copies of the same agent?
>
> Try:
>
> (let [rainagents (vec (map agent (repeat num-raindrops nil)))]>    (dorun
> >     (pmap
> >      #(send-off % draw-raindrop-fall g (rand-nth (range 0 500)))
> >      rainagents))))
>
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View --http://corfield.org/
> World Singles, LLC. --http://worldsingles.com/
> Railo Technologies, Inc. --http://www.getrailo.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to