title: how to understand alt in clojure core.async
body: <p>I have read the following document and the example, but still doesn't get what it really means. I understand alts!!, but not alt!!.Anybody show an example easy to understand?</p>
  
  <p><a href="https://clojure.github.io/core.async/#clojure.core.async/alt" rel="noreferrer">https://clojure.github.io/core.async/#clojure.core.async/alt</a>!!</p>
  
  <p>I have also ready the following link</p>
  
  <p><a href="https://stackoverflow.com/questions/22085497/in-clojure-core-async-whats-the-difference-between-alts-and-alt">In Clojure (core.async) what&#39;s the difference between alts and alt?</a></p>
  
  <p>update: The example is in the doc is:</p>
  
  <pre><code>(alt!
    [c t] ([val ch] (foo ch val))
    x ([v] v)
    [[out val]] :wrote
    :default 42)
  </code></pre>
  
  <p>for the second line of </p>
  
  <pre><code>[c t] ([val ch] (foo ch val))
  </code></pre>
  
  <p>channel-op of [c t] means a channel c and an value t:  put value t on channel c.
  result-expr of ([val ch] (foo ch val)) means bidding [val ch] for the operation, but since it's a list, [val ch] should be evaluate as a function, and (foo ch val) will be as the parameter passed to function of [val ch]. but what does it mean for function of [val ch] with parameter of (foo ch val) ?</p>