Re: map> vs map< in core.async

2013-12-16 Thread Joachim De Beule
Thanks, that's very helpful! -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe fr

Re: map> vs map< in core.async

2013-12-13 Thread Walter van der Laan
Please try these exercises if you want to know what a channel is: https://github.com/halgari/clojure-conj-2013-core.async-examples/blob/master/src/clojure_conj_talk/core.clj Op vrijdag 13 december 2013 11:01:57 UTC+1 schreef Joachim De Beule: > > Thanks, that indeed did the trick. > > More genera

Re: map> vs map< in core.async

2013-12-13 Thread Joachim De Beule
Thanks, that indeed did the trick. More generally it's not clear to me what makes a channel an "output channel" or an "input channel". Aren't all channels input and output channels depending on whether you read from or write to it? Op vrijdag 13 december 2013 04:28:53 UTC+1 schreef Carlo: >

Re: map> vs map< in core.async

2013-12-12 Thread Carlo Zancanaro
On Thu, Dec 12, 2013 at 06:08:11PM -0800, Joachim De Beule wrote: > I expected to see a sequence of the form "<><><>...". However, only one or > very few ">" get printed, so I get a sequence "<>>>...". Why? They're getting buffered. Try this: (as/pipe (as/map< (fn [x] (print "<") (flush) x) sou

map> vs map< in core.async

2013-12-12 Thread Joachim De Beule
Dear list, I'm playing around with core.async and I don't understand the following. 1) I make a "source" channel that emits a random number every second. (def continue (atom true)) (def source (let [out (as/chan)] (as/go-loop [] (when @continue (as/pu