True and false booleans are represented by the values #t and #f, respectively, though operations that depend on a boolean value typically treat anything other than #f as true. The #t value is always eq? to itself, and #f is always eq? to itself.
See Reading Booleans for information on reading booleans and Printing Booleans for information on printing booleans.
See also and, or, andmap, and ormap.
Returns #t if v is #t or #f, #f otherwise.
Examples:
Returns #t if v is #f, #f otherwise.
Examples:
> (not #f)#t
> (not #t)#f
> (not 'we-have-no-bananas)#f
Note that immutable? is not a general predicate for immutability (despite its name). It works only for a handful of datatypes for which a single predicate—string?, vector?, etc.—recognizes both mutable and immutable variants of the datatype. In particular, immutable? produces #f for a pair, even though pairs are immutable, since pair? implies immutability.
See also immutable-string?, mutable-string?, etc.
Examples:
4.2.1 Boolean Aliases🔗ℹAn alias for #t.
An alias for #f.
Returns
(equal? a b)(if
aand
bare symbols).
Returns
(equal? a b)(if
aand
bare booleans).
Examples:
> (nand #f #t)#t
> (nand #f (error 'ack "we don't get here"))#t
In the two argument case, returns #t if neither of the arguments is a true value.
Examples:
> (nor #f #t)#f
> (nor #t (error 'ack "we don't get here"))#f
Checks to be sure that the first expression implies the second.
Same as (if expr1 expr2 #t).
Examples:
Returns the exclusive or of b1 and b2.
If exactly one of b1 and b2 is not #f, then return it. Otherwise, returns #f.
Examples:
> (xor 11 #f)4.2.2 Mutability Predicates🔗ℹ11
> (xor #f 22)22
> (xor 11 22)#f
> (xor #f #f)#f
Added in version 8.9.0.3 of package base.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4