OK, I should have just tried passing in 'and at the REPL before posting.  Of 
course, it works.  Is this the idiomatic way?  I'm still curious about 
short-circuiting.

On Feb 20, 2010, at 11:38 AM, Johnny Kwan wrote:

> Hi,
> 
> This is a very basic question, but I can't find the answer anywhere.  How do 
> you take the "and" or "or" of sequence?  They are defined as macros and can't 
> be passed into "apply" or "reduce".  Is there some reader macro character to 
> force it?  Also, how does one write it so that it will short-circuit?
> 
> The specific problem I'm trying to solve is to see if two sequences of 
> strings "=" each other.  If one sequence is shorter, the "=" comparison stops 
> at the end of the shorter sequence.  So I've been trying to do a simple 
> (reduce and (map = seq1 seq2)).
> 
> Even if there is a core lib function that does this (probably some prefix 
> compare), I'd like to know how to pass macros as functions.  I'm also curious 
> about short-circuiting.
> 
> Thanks,
> Johnny

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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