Skip to content

Instantly share code, notes, and snippets.

@halgari halgari/gist:6382422
Created Aug 29, 2013

Embed
What would you like to do?
(def c (chan))
(defn drain [c]
(go
(loop [col []]
(if-let [v (<! c)]
(recur (conj col v))
col))))
(go
(let [s (<! (drain c))]
...do something...))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.