The analysis for the go macro to determine that the fn never escapes the go block is not something core.async does. Because of that functions are sort of a black box to the transforms the go macro does.
http://dev.clojure.org/jira/browse/ASYNC-93 is a declined issue regarding this. http://dev.clojure.org/jira/browse/ASYNC-57 is another similar declined issue. On 08/25/2016 04:21 PM, hiskennyness wrote: > I am getting an error about >! not being in a go block with this code: > > | > (go-loop [state :nl > column 0 > last-ws nil > buff ""] > (let [line-out(fn [c b] > (>!out(apply str b (repeat (-col-width (count > b))\space))))] > (cond > (>=column col-width) > (condp =state > :ws (do > (line-out\|buff) > (recur :nl 0nil"")) > ..etc etc > | > > I just changed the line-out call to just do... > > | > (>!out-chan buff) > | > > ...and it worked fine. > > So the failing code is both dynamically and lexically within the scope > of the go-loop --- is that supposed to be that way? Or am I completely > missing something? > > -kt > > -- > 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 from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? -- 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 from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.