commit a606d8afb410b4b388fc050c290caa87e4291a36
parent fa52e1a671fc3b05747e51bff5bcb70d862685b2
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date: Sat, 3 Feb 2024 13:15:38 -0500
Booleans: Further texification.
Diffstat:
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/doc/r7rs-small/procedures/booleans.texinfo b/doc/r7rs-small/procedures/booleans.texinfo
@@ -1,18 +1,25 @@
@node Booleans
@section Booleans
-The standard boolean objects for true and false are written as #t and #f.Alternatively,
-they can be written #true and #false, respectively. What really matters, though, are the
-objects that the Scheme conditional expressions (if, cond, and, or, when, unless, do)
-treat as trueor 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
+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 #f counts as false in conditional expressions. All other
-Scheme values, including #t, count as true.
+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 #f and the empty list
-from each other and from the symbol nil.
+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.
@@ -25,9 +32,8 @@ programs.
@deffn procedure not obj
-The not procedure returns #t if
-
-obj is false, and returns #f otherwise.
+The not procedure returns @code{#t} if @var{obj} is false, and returns
+@code{#f} otherwise.
@lisp
(not #t) @result{} #f
@@ -38,22 +44,25 @@ obj is false, and returns #f otherwise.
(not (list)) @result{} #f
(not 'nil) @result{} #f
@end lisp
+
@end deffn
@deffn procedure boolean? obj
-The boolean? predicate returns #t if
-
-obj is either #t or #f and returns #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
@end lisp
+
@end deffn
@deffn procedure boolean=? boolean1 boolean2 boolean3 @dots{}
-Returns #t if all the arguments are #t or all are #f.
+Returns @code{#t} if all the arguments are booleans and all
+are @code{#t} or all are @code{#f}.
+
@end deffn