I would say use macros to avoid
hiding calls from the go macro
scope.

Luc P.

> I recently discovered that parking calls only work if they're directly 
> contained within a go block. So this works fine:
> 
> (defn foo [ch]
>   (go
>     (<! ch)))
> 
> But this:
> 
> (defn bar [ch]
>   (<! ch))
> 
> (defn foo [ch]
>   (go
>     (bar ch)))
> 
> Results in Assert failed: <! used not in (go ...) block
> 
> Is there any way around this? If I have a go block that's getting too big and 
> want to extract some portion of it into a separate function, what's the best 
> approach?
> 
> --
> paul.butcher->msgCount++
> 
> Silverstone, Brands Hatch, Donington Park...
> Who says I have a one track mind?
> 
> http://www.paulbutcher.com/
> LinkedIn: http://www.linkedin.com/in/paulbutcher
> Skype: paulrabutcher
> 
> 
> 
> 
> -- 
> -- 
> 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/groups/opt_out.
> 
--
Luc Prefontaine<lprefonta...@softaddicts.ca> sent by ibisMail!

-- 
-- 
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/groups/opt_out.

Reply via email to