Hey, I'm trying to use and in a cond statement. Basically, instead of simply checking that <exp1> is true before running some code, I need Scheme to check that <exp1> AND <exp2> are true. I understand that (and #t #f) evaluates to #f and that (and (= 10 (* 2 5)) #t) evaluates to #t. Unfortunately, Scheme will not accept
(and (eqv? (length x) 1) (eqv? (car x) #t))
where x is a list whose first element is an S-expression that evaluates to either #t or #f (in fact, I wanted to just do (and (eqv? (length x) 1) (car x)), but that didn't work).
Can anyone explain what I am doing wrong, or how to fix it? On a side note, does anyone know what ... means in Scheme, if anything? Thanks!
andor are you trying to use it? In general, your question is very unclear, and suffers from really bad formatting that hides some of the text. Without sorting it out it would be very difficult to say anything. - Eli Barzilay