Version: 4.0.2
3.1 Booleans
Scheme has two distinguished constants to represent boolean values: #t for true and #f for false. Uppercase #T and #F are parsed as the same values, but the lowercase forms are preferred.
The boolean? procedure recognizes the two boolean constants. In the result of a test expression for if, cond, and, or, etc., however, any value other than #f counts as true.
Examples: |
#t |
> (boolean? #t) |
#t |
> (boolean? #f) |
#t |
> (boolean? "no") |
#f |
> (if "no" 1 0) |
1 |