boolean -- r7rs Type eq?;eqv?;equal?;boolean=?;symbol=?;=;<;>;<=;>=;string=?;string<?;string>?;string<=?;string>=?;string-ci=?;string-ci<?;string-ci>?;string-ci<=?;string-ci>=?;u8-ready?;char-ready?;file-exists?;char=?;char<?;char>?;char<=?;char>=?;char-ci=?;char-ci<?;char-ci>?;char-ci<=?;char-ci>=?;read-error?;file-error?;equivalent-by-identity?;equivalent-by-value-strict?;equivalent-by-value-strict-recursive?;boolean?;not;symbol?;number?;integer?;real?;rational?;complex?;exact?;inexact?;exact-integer?;zero?;positive?;negative?;odd?;even?;finite?;infinite?;nan?;pair?;null?;list?;vector?;string?;bytevector?;port?;binary-port?;textual-port?;input-port?;input-port-open?;output-port?;output-port-open?;eof-object?;char?;char-alphabetic?;char-upper-case?;char-lower-case?;char-numeric?;char-whitespace?;procedure?;error-object?;promise?;proper-or-empty-list?;member;memq;memv;assoc;assq;assv;string->number;digit-value;Note: These definitions produce an output that is a sub-type.
boolean?
The standard boolean objects for true and false are written as
#tand#f. Alternatively, they can be written#trueand#false, respectively. What really matters, though, are the objects that the Scheme conditional expressions (if,cond,and,or,when,unless,do) treat as true or false. The phrase a true value (or sometimes just true) means any object treated as true by the conditional expressions, and the phrase a false value (or false) means any object treated as false by the conditional expressions.Of all the Scheme values, only
#fcounts as false in conditional expressions. All other Scheme values, including#t, count as true.Note: Unlike some other dialects of Lisp, Scheme distinguishes
#fand the empty list empty list from each other and from the symbolnil.Boolean constants evaluate to themselves, so they do not need to be quoted in programs.
#t ===> #t #f ===> #f '#f ===> #f
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.