I can't speak for whether this is a truly idiomatic way of doing this, but this is a macro i've been using for this case.
(defmacro plet [bindings & body]
"Just like let, but evaluates bindings in parallel"
(let [bindings (partition-all 2 bindings)
destructs (map first bindings)
expressions (map second bindings)
vars (repeatedly (count bindings) gensym)]
`(let [~@(mapcat (fn [var expr] `[~var (future ~expr)]) vars expressions)
~@(mapcat (fn [destr var] `[~destr (deref ~var)]) destructs vars)]
~@body)))This gives me a similar construct to let, but with each binding evaluated in parallel using a future. For small sets i think this is less overhead than pmap - note that unlike the traditional let, this will not handle multiple bindings for the same variable properly.
Usage would then be
(plet [a (http/get "url1")
b (http/get "url2")]
(vec a b))
Or similar
Cheers
Glen