>> Is this behavior the specified behavior?  Can I ASSUME it is true in
>> my code?


I imagine that Clojure's some?/every? follow Common Lisp's every and  
some, defined as:

        every returns false as soon as any invocation of predicate returns  
false. If the end of a sequence is reached, every returns true. Thus,  
every returns true if and only if every invocation of predicate  
returns true.

        some returns the first non-nil value which is returned by an  
invocation of predicate. If the end of a sequence is reached without  
any invocation of the predicate returning true, some returns false.  
Thus, some returns true if and only if some invocation ofpredicate  
returns true.



even? never returns false (because it's never called), and so every?  
returns true when it reaches the end of the sequence.

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