r7rs-small-texinfo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://kaka.farm/~git/r7rs-small-texinfo
Log | Files | Refs

commit 08b69faafb2d2c355c424fd36bbd3464519b7056
parent a606d8afb410b4b388fc050c290caa87e4291a36
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Sat,  3 Feb 2024 13:17:06 -0500

Booleans: Reflow paragraphs & tidy examples.

Diffstat:
Mdoc/r7rs-small/procedures/booleans.texinfo | 75++++++++++++++++++++++++++++++++++++---------------------------------------
1 file changed, 36 insertions(+), 39 deletions(-)

diff --git a/doc/r7rs-small/procedures/booleans.texinfo b/doc/r7rs-small/procedures/booleans.texinfo @@ -1,33 +1,30 @@ @node Booleans @section Booleans -The standard boolean objects for true and false are written as -@code{#t} and @code{#f}. -Alternatively, they can be written @code{#true} and @code{#false}, -respectively. What really -matters, though, are the objects that the Scheme conditional expressions -(@code{if}, @code{cond}, @code{and}, @code{or}, @code{when}, @code{unless}, @code{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 @code{#f} -counts as false in conditional expressions. -All other Scheme values, including @code{#t}, -count as true. - -Note: Unlike some other dialects of Lisp, -Scheme distinguishes @code{#f} and the empty list empty list -from each other and from the symbol @code{nil}. - -Boolean constants evaluate to themselves, so they do not need to be quoted in -programs. +The standard boolean objects for true and false are written as @code{#t} +and @code{#f}. Alternatively, they can be written @code{#true} and +@code{#false}, respectively. What really matters, though, are the +objects that the Scheme conditional expressions (@code{if}, @code{cond}, +@code{and}, @code{or}, @code{when}, @code{unless}, @code{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 @code{#f} counts as false in conditional +expressions. All other Scheme values, including @code{#t}, count as true. + +Note: Unlike some other dialects of Lisp, Scheme distinguishes @code{#f} +and the empty list empty list from each other and from the symbol +@code{nil}. + +Boolean constants evaluate to themselves, so they do not need to be +quoted in programs. @lisp -#t @result{} #t -#f @result{} #f -'#f @result{} #f +#t @result{} #t +#f @result{} #f +'#f @result{} #f @end lisp @deffn procedure not obj @@ -36,33 +33,33 @@ The not procedure returns @code{#t} if @var{obj} is false, and returns @code{#f} otherwise. @lisp -(not #t) @result{} #f -(not 3) @result{} #f -(not (list 3)) @result{} #f -(not #f) @result{} #t -(not '()) @result{} #f -(not (list)) @result{} #f -(not 'nil) @result{} #f +(not #t) @result{} #f +(not 3) @result{} #f +(not (list 3)) @result{} #f +(not #f) @result{} #t +(not '()) @result{} #f +(not (list)) @result{} #f +(not 'nil) @result{} #f @end lisp @end deffn @deffn procedure boolean? obj -The @code{boolean?} predicate returns @code{#t} if @var{obj} is either @code{#t} or -@code{#f} and returns @code{#f} otherwise. +The @code{boolean?} predicate returns @code{#t} if @var{obj} is either +@code{#t} or @code{#f} and returns @code{#f} otherwise. @lisp -(boolean? #f) @result{} #t -(boolean? 0) @result{} #f -(boolean? '()) @result{} #f +(boolean? #f) @result{} #t +(boolean? 0) @result{} #f +(boolean? '()) @result{} #f @end lisp @end deffn @deffn procedure boolean=? boolean1 boolean2 boolean3 @dots{} -Returns @code{#t} if all the arguments are booleans and all -are @code{#t} or all are @code{#f}. +Returns @code{#t} if all the arguments are booleans and all are +@code{#t} or all are @code{#f}. @end deffn