"reduce" or "apply" using logical functions in Clojure

Posted by Alex B on Stack Overflow See other posts from Stack Overflow or by Alex B
Published on 2010-05-23T12:29:07Z Indexed on 2010/05/23 12:30 UTC
Read the original article Hit count: 188

Filed under:

I cannot use logical functions on a range of booleans in Clojure (1.2). Neither of the following works due to logical functions being macros:

(reduce and [... sequence of bools ...])
(apply or [... sequence of bools ...])

The error saying that I "can't take value of a macro: #'clojure.core/and". How to apply these logical functions (macros) without writing boilerplate code?

© Stack Overflow or respective owner

Related posts about clojure