Fork me on GitHub
#core-async
<
2018-09-15
>
xiongtx23:09:49

I'd like to write a function like the following:

(defn consume-chs
  [chs]
  (go-loop []
    (let [vs (for [ch chs] (<! ch))]
      (when (every? some? vs)
        (println vs)
        (recur)))))
However, using <! inside of for is illegal. <! also cannot be used inside an anonymous fn. What's the best way to achieve the above?