Code: Select all
> (true? '())
nil
Code: Select all
> (define (bool x) (if (nil? x) nil true))
> (for-all bool '(1 2 3 4 () 6))
Code: Select all
> (true? '())
nil
Code: Select all
> (define (bool x) (if (nil? x) nil true))
> (for-all bool '(1 2 3 4 () 6))
`true?` works as advertised.ssqq wrote:if you use true? as checking function for list, be attention to: blank list -> '(), would not match it.
Code: Select all
> (true? '()) nil