On 12 February 2010 10:22, MiltondSilva <shadowtr...@gmail.com> wrote:
> (add-watch products :prodkey send-products)
> (add-watch material :matkey ask-material)
> (dump material products products-store)
>  (loop [cnt 10]
>    (map #(send % client-act) clients)
>    (map #(send % manufacture) artisans)
>    (if (zero? cnt) (str "done") (recur (dec cnt))))
>
> It just prints "done". Where is the output of dump?

Lazy map strikes again!
Use doseq instead of map.
(map f coll) returns a lazy sequence which is not evaluated unless
used. If you want side-effects (like send) you need to force the
execution.

-- 
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

Reply via email to