dsjoka wrote:Lets say we have:
((and (something1)(something2)(something3)(something4)) #t)
Your expression appears malformed and would generate an error (unless quoted); I am guessing you want something such as:
(and (something1)(something2)(something3)(something4) #t)
dsjoka wrote:How does it compute it, does it test if all four are true or does it in pairs like:
In Scheme, 'and' is a special form (not a function). It evaluates each of its arguments one at a time, stopping when that evaluation is false (subsequent arguments will not be evaluated). If the end of all arguments is reached without any falses, the value of the last argument is returned.
(and w x y z)
is equivalent to
(if w (if x (if y z)))
Note that since 'and' is not a function, you can not use it with either 'map' or 'apply'.