On Tue, Jun 22, 2010 at 4:42 PM, rob levy <[email protected]> wrote: > user=> (ns utils) > utils=> (ns-unmap 'utils 'cond) > utils=> (defmacro cond [& body] `(clojure.core/cond ~@(apply concat body))) > #'utils/cond > utils=> (macroexpand-1 '(cond (false "false") (true "true"))) > (clojure.core/cond false "false" true "true") > utils=> (cond > (false "false") > (true "true")) > "true" >
Yes, you CAN do that, but SHOULD you? If your code is maintained by more than one person, and the version of cond used is inconsistent from namespace to namespace, that's going to cause you a bit of grief sooner or later! > > On Tue, Jun 22, 2010 at 6:11 PM, cageface <[email protected]> wrote: >> >> I think I'm going to take this route. The style seems pretty common in >> clojure contrib and it's readable, if a bit odd at first. >> >> On Jun 22, 2:20 pm, David Powell <[email protected]> wrote: >> > I tend to write the condition and action on separate lines, and put a >> > blank comment in between each, like this: >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to [email protected] >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> [email protected] >> 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 post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
