The go block itself (and thus any call to walker) returns a channel. This
value is indeed thrown away; its utility lies entirely in the fact that the
caller had to wait for it. All of the actual values from the tree are
written to the supplied channel 'ch', and the ultimate caller of this
function
For this value please read the value taken from this channel.
On Sep 14, 2013 12:21 AM, Alan Shaw noden...@gmail.com wrote:
The go block itself (and thus any call to walker) returns a channel. This
value is indeed thrown away; its utility lies entirely in the fact that the
caller had to wait
I am stupid and recursion is clearly beyond my intellect. Martin Trojer has
a great blog post here which I learned a lot from but I don't understand
why the final example works:
http://martintrojer.github.io/clojure/2013/07/17/non-tailrecursive-functions-in-coreasync/
He offers this as an
It forces the go block to wait until (walker (:left t)) pushes something --
that is, for the recursively-entered go block to complete. Similarly the
right branch is waited for before the parent go block completes. So forcing
an in-order traversal of the tree.
On Fri, Sep 13, 2013 at 5:13 PM,