go宏对用户代码进行了什么转换?

问题描述 投票:0回答:1

宏如何转换代码

(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")))
clojure clojurescript core.async
1个回答
1
投票

这是后面的状态机。您可以在The State Machines of core.async]中阅读更多内容

© www.soinside.com 2019 - 2024. All rights reserved.