Hi Timothy, One paragraph summary:
When a macro expands to case inside of a go-block, it appears that the _ELSE_ clause of the case is always run. (Even after a previous clause has matched.) Slightly longer summary: In these lines: https://github.com/txrev319/bug-report/blob/master/src/app.cljx#L11-L20 The macro is supposed to expand into: (case (:tag {:tag :dog}) :dog "woof woof" "unrecognized") When we do not use go, we get the result as expected. When we put it into a go-block, it appears that both the :dog "woof woof" branch and the "unrecognized" branch are _BOTH_ being executed -- when only one should be executed. On Tue, Feb 18, 2014 at 12:09 PM, Thomas Heller <th.hel...@gmail.com> wrote: > Well, while case allows for symbols it still doesn't make sense to use it > except :tag switches between keywords and symbols to. Apart from that cat > "pat2" is never actually used. > > (defmacro silly [object pat1 body1 pat2 body2] > `(case (:tag ~object) > ~pat1 ~body1 > ~body2)) > > > > But as Timothy said its probably related to case, so I'll shut up. > > On Tuesday, February 18, 2014 8:20:07 PM UTC+1, Ben wrote: >> >> On Tue, Feb 18, 2014 at 11:18 AM, Thomas Heller <th.h...@gmail.com> wrote: >>> >>> While I haven't tested the code, I can see one "obvious" mistake. >>> >>> https://github.com/txrev319/bug-report/blob/master/src/app.cljx#L20 >>> >>> "cat" is undefined? >>> >> >> That isn't a mistake. `silly` expands into a case, which expects bare >> symbols. >> >> -- >> Ben Wolfson >> "Human kind has used its intelligence to vary the flavour of drinks, which >> may be sweet, aromatic, fermented or spirit-based. ... Family and social >> life also offer numerous other occasions to consume drinks for pleasure." >> [Larousse, "Drink" entry] >> > -- > 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. -- 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.