![](/img/trans.png)
[英]What's the best way to handle this sequence transformation in Clojure?
[英]What transformation is go macro doing to the user’s code?
go宏如何轉換代碼
(let [c1 (chan)
c2 (chan)]
(go (while true
(let [[v ch] (alts! [c1 c2])]
(println "Read" v "from" ch))))
(go (>! c1 "hi"))
(go (>! c2 "there")))
它是后面的狀態機。 您可以在core.async 的狀態機中閱讀更多內容
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.