The reason "and" is a macro is that it's designed to short-circuit - ie if
the first result is false the rest shouldn't even be evaluated.

Using it on raw booleans works, because booleans evaluate to themselves,
but it's really designed to be given forms.

The absence of a pure function for conjunction is an interesting omission,
but BG's lambda fn does the trick.



On 22 May 2013 09:16, Mark Engelberg <[email protected]> wrote:

> Using eval should be a rarity.
>
> I'd use (every? identity [false false true]) to do a reduce-and, and I'd
> use (some identity [false false true]) to do a reduce-or (keeping in mind
> the latter actually returns nil rather than false).
>
>  --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> 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 [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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to