Re: How does ! order results from async?

2013-09-14 Thread Alan Shaw
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

Re: How does ! order results from async?

2013-09-14 Thread Alan Shaw
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

How does ! order results from async?

2013-09-13 Thread larry google groups
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

Re: How does ! order results from async?

2013-09-13 Thread Cedric Greevey
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,