Steve,

On Mon, Jun 7, 2010 at 12:48, Steve Purcell <st...@sanityinc.com> wrote:
> On 7 Jun 2010, at 12:43, Steve Purcell wrote:
>
>> Empty seqs are logically true, so your "if" condition is always true.
>
>
> Apologies; I'm talking rubbish:
>
> user=> (if '() (println "truthy"))
> truthy
> nil
> user=> (if (seq '()) (println "truthy"))
> nil

So the seq is the important bit then. A seq with nothing left in it is
false, but an empty list is true.

cheers,
Bruce

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