Thanks Luc,

This was a simplification if what I really have :) I actually need the
result. The actual code was something like:

(let [results (for [host hosts]
                  (future (remote-exec commands host)))]
    (pmap deref results))

where remote-exec runs commands via ssh-clj.

Is there another way to verify that the futures executed?

Thanks.




On Thu, Jun 18, 2015 at 11:06 AM, Luc Prefontaine <
lprefonta...@softaddicts.ca> wrote:

> Btwy,
>
> For is not a loop as in imperative  languages. It returns a lazy sequence.
>
> Luc P.
>
> Sent from my iPhone
>
> On Jun 18, 2015, at 07:51, Haim Ashkenazi <haim.ashken...@gmail.com>
> wrote:
>
> Hi,
>
> I'm trying boot scripting capabilities so I have the following file:
>
> #!/usr/bin/env boot
> (set-env!
>  :dependencies '[[org.clojure/clojure "1.6.0"]])
>
> (defn -main
>   []
>   (println "before")
>   (for [s ["one" "two" "three"]]
>     (do
>       (spit "output" s :append true)
>       (println s)))
>   (println "after"))
>
>
> When running this script form the command line all the stuff inside the
> *for* loop is doesn't seem to run:
>
> ✓ src ➤ ./testboot
> before
> after
>
> ... and there's no "out[put" file. Inside a REPL it runs without a
> problem. Am I missing something?
>
> Thanks in advance
>
> --
> Haim
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>  --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Haim

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to