`
clojure
(def c1 (chan))
(def c2 (chan))
(def out (a/map vector (link: c1 c2)))
(a/close! c1)
(a/<!! out) ;; will hangs until I put item to c2
or close c2
`
I think the better way is close output channel immediately when any of input channels closed.