Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.async by

Title says it all.

6 Answers

0 votes
by

Comment made by: johanatan

Actually, my code is a bit more complicated:

`
(defn func []
(go

 (let [...]
   (for [[a b c d] e]
     (let [...]
        (when pred
           (let [val (<! ...)]  ...)))))))

`

0 votes
by

Comment made by: bronsa

You cannot user for inside a go block

0 votes
by

Comment made by: johanatan

The for cannot appear anywhere inside a go? Or the for cannot contain inside it any async calls; i.e., is it ok for for to appear somewhere in the let binding as a sibling to a call to <!?

0 votes
by

Comment made by: bronsa

You can't use <! inside a for inside a go block, code like this OTOH should be valud:

`
(go
(let [.. (for [..] ..)]

(<! ..)))

`

0 votes
by

Comment made by: johanatan

Ahh, perfect! Thx!

0 votes
by
Reference: https://clojure.atlassian.net/browse/ASYNC-161 (reported by johanatan)
...