On 8 July 2010 07:47, Laurent PETIT <[email protected]> wrote: > > > 2010/7/8 Pedro Teixeira <[email protected]> >> >> What's the idiomatic way to handle cases where one has a macro rather >> than a function? >> >> For example: >> >> intent is as follows but does not work: >> (def args [false true false]) >> (apply or args) >> >> >> alternatives? >> >> a> (eval `(or @~args)) > > big no-no. >> >> b> (reduce #(or %1 %2) args) >> > that's it.
Or for this particular example you can use some: user=> (some #(= true %) (repeat true)) true -- Michael Wood <[email protected]> -- 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
