On Jan 15, 2:05 pm, Daniel Jomphe <danieljom...@gmail.com> wrote:
> > (every? identity [true false true])
>
> So obvious, yet so overlooked each time I read the function names in
> the api!

Hi Daniel,

FYI, the reason "and" doesn't work is that it's a macro, not a
function.  Only functions can be used with "apply".

If you had a hypothetical "and function" like this:

    (defn and-fn [& args] (every? identity args))

Then you could use apply:

    (apply and-fn [true true])
    ;=> true
    (apply and-fn [true false true])
    ;=> false

But, obviously, just using "every?" in the first place is a lot
simpler.
-Stuart Sierra

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to