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 b662393121d2084f252e7054d32fd50a5df60b45
parent 541e71a86980d2fb72a96c121aa7f34294ac1500
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Wed, 31 Jan 2024 17:41:24 -0500

Reflow.

Diffstat:
Mdoc/r7rs-small/r7rs-small.texinfo | 108++++++++++++++++++++++++++++++++++++++++++-------------------------------------
1 file changed, 57 insertions(+), 51 deletions(-)

diff --git a/doc/r7rs-small/r7rs-small.texinfo b/doc/r7rs-small/r7rs-small.texinfo @@ -1559,9 +1559,9 @@ Syntax: @svar{Key} can be any expression. Each @svar{clause} has the form @code{((}@svar{datum@sub{1}} @dots{}@code{) }@svar{expression@sub{1}} @svar{expression@sub{2}} @dots{}@code{)}, @end display -where each @svar{datum} is an external -representation of some object. It is an error if any of the @svar{datum}s are the same -anywhere in the expression. Alternatively, a @svar{clause} can be of the form +where each @svar{datum} is an external representation of some object. It is +an error if any of the @svar{datum}s are the same anywhere in the +expression. Alternatively, a @svar{clause} can be of the form @display @code{((}@svar{datum@sub{1}} @dots{})@code{ => }@svar{expression}@code{)} @@ -1579,20 +1579,24 @@ or @code{(else => }@svar{expression}@code{)}. @end display -Semantics: A @code{case} expression is evaluated as follows. @svar{Key} is evaluated and its result is -compared against each @svar{datum}. If the result of evaluating @svar{key} is the same (in the -sense of @code{eqv?}; @xref{Equivalence predicates}) to a @svar{datum}, then the expressions in the corresponding -@svar{clause} are evaluated in order and the results of the last expression in the @svar{clause} are -returned as the results of the @code{case} expression. +Semantics: A @code{case} expression is evaluated as follows. @svar{Key} is +evaluated and its result is compared against each @svar{datum}. If the +result of evaluating @svar{key} is the same (in the sense of @code{eqv?}; +@xref{Equivalence predicates}) to a @svar{datum}, then the expressions in +the corresponding @svar{clause} are evaluated in order and the results of +the last expression in the @svar{clause} are returned as the results of the +@code{case} expression. -If the result of evaluating @svar{key} is different from every @svar{datum}, then if there is an else -clause, its expressions are evaluated and the results of the last are the results of the @code{case} -expression; otherwise the result of the case expression is unspecified. +If the result of evaluating @svar{key} is different from every @svar{datum}, +then if there is an else clause, its expressions are evaluated and the +results of the last are the results of the @code{case} expression; otherwise +the result of the case expression is unspecified. -If the selected @svar{clause} or else clause uses the @code{=>} alternate form, then the @svar{expression} is -evaluated. It is an error if its value is not a procedure accepting one argument. This -procedure is then called on the value of the @svar{key} and the values returned by this -procedure are returned by the @code{case} expression. +If the selected @svar{clause} or else clause uses the @code{=>} alternate +form, then the @svar{expression} is evaluated. It is an error if its value +is not a procedure accepting one argument. This procedure is then called on +the value of the @svar{key} and the values returned by this procedure are +returned by the @code{case} expression. @end deffn @example @@ -1612,11 +1616,11 @@ procedure are returned by the @code{case} expression. @deffn syntax and @svar{test@sub{1}}@dots{} -Semantics: The @svar{test} expressions are evaluated from left to right, and if -any expression evaluates to @code{#f} (@xref{Booleans}), then @code{#f} is returned. -Any remaining expressions are not evaluated. If all the expressions evaluate to -true values, the values of the last expression are returned. If there -are no expressions, then @code{#t} is returned. +Semantics: The @svar{test} expressions are evaluated from left to right, and +if any expression evaluates to @code{#f} (@xref{Booleans}), then @code{#f} +is returned. Any remaining expressions are not evaluated. If all the +expressions evaluate to true values, the values of the last expression are +returned. If there are no expressions, then @code{#t} is returned. @end deffn @example @@ -1630,10 +1634,11 @@ are no expressions, then @code{#t} is returned. @deffn syntax or @svar{test@sub{1}}@dots{} -Semantics: The @svar{test} expressions are evaluated from left to right, and the value of the -first expression that evaluates to a true value (@xref{Booleans}) is returned. Any remaining -expressions are not evaluated. If all expressions evaluate to @code{#f} or if there are no -expressions, then @code{#f} is returned. +Semantics: The @svar{test} expressions are evaluated from left to right, and +the value of the first expression that evaluates to a true value +(@xref{Booleans}) is returned. Any remaining expressions are not evaluated. +If all expressions evaluate to @code{#f} or if there are no expressions, +then @code{#f} is returned. @end deffn @example @@ -1650,8 +1655,9 @@ expressions, then @code{#f} is returned. Syntax: The @svar{test} is an expression. -Semantics: The test is evaluated, and if it evaluates to a true value, the expressions are -evaluated in order. The result of the @code{when} expression is unspecified. +Semantics: The test is evaluated, and if it evaluates to a true value, the +expressions are evaluated in order. The result of the @code{when} expression +is unspecified. @end deffn @display @@ -1667,8 +1673,9 @@ evaluated in order. The result of the @code{when} expression is unspecified. Syntax: The @svar{test} is an expression. -Semantics: The test is evaluated, and if it evaluates to @code{#f}, the expressions are evaluated in -order. The result of the @code{unless} expression is unspecified. +Semantics: The test is evaluated, and if it evaluates to @code{#f}, the +expressions are evaluated in order. The result of the @code{unless} +expression is unspecified. @end deffn @display @@ -1682,8 +1689,9 @@ order. The result of the @code{unless} expression is unspecified. @deffn syntax cond-expand @svar{ce-clause@sub{1}} @svar{ce-clause@sub{2}}@dots{} -Syntax: The @code{cond-expand} expression type provides a way to statically expand different -expressions depending on the implementation. A @svar{ce-clause} takes the following form: +Syntax: The @code{cond-expand} expression type provides a way to statically +expand different expressions depending on the implementation. A +@svar{ce-clause} takes the following form: @display @code{(}@svar{feature requirement} @svar{expression} @dots{}@code{)} @@ -1715,29 +1723,27 @@ A @svar{feature requirement} takes one of the following forms: @end itemize -Semantics: -Each implementation maintains a list of feature identifiers which are -present, as well as a list of libraries which can be imported. The -value of a @svar{feature requirement} is determined by replacing -each @svar{feature identifier} and @code{(library }@svar{library name}@code{)} -on the implementation's lists with @code{#t}, and all other feature -identifiers and library names with @code{#f}, then evaluating the -resulting expression as a Scheme boolean expression under the normal -interpretation of @code{and}, @code{or}, and @code{not}. - -A @code{cond-expand} is then expanded by evaluating the -@svar{feature requirement}s of successive @svar{ce-clause}s -in order until one of them returns @code{#t}. When a true clause is -found, the corresponding @svar{expression}s are expanded to a -@code{begin}, and the remaining clauses are ignored. -If none of the @svar{feature requirement}s evaluate to @code{#t}, then -if there is an else clause, its @svar{expression}s are +Semantics: Each implementation maintains a list of feature identifiers which +are present, as well as a list of libraries which can be imported. The value +of a @svar{feature requirement} is determined by replacing each +@svar{feature identifier} and @code{(library }@svar{library name}@code{)} on +the implementation's lists with @code{#t}, and all other feature identifiers +and library names with @code{#f}, then evaluating the resulting expression +as a Scheme boolean expression under the normal interpretation of +@code{and}, @code{or}, and @code{not}. + +A @code{cond-expand} is then expanded by evaluating the @svar{feature +requirement}s of successive @svar{ce-clause}s in order until one of them +returns @code{#t}. When a true clause is found, the corresponding +@svar{expression}s are expanded to a @code{begin}, and the remaining clauses +are ignored. If none of the @svar{feature requirement}s evaluate to +@code{#t}, then if there is an else clause, its @svar{expression}s are included. Otherwise, the behavior of the @code{cond-expand} is unspecified. -Unlike @code{cond}, @code{cond-expand} does not depend on the value -of any variables. +Unlike @code{cond}, @code{cond-expand} does not depend on the value of any +variables. -The exact features provided are implementation-defined, but for portability a core set of -features is given in appendix B. +The exact features provided are implementation-defined, but for portability +a core set of features is given in appendix B. @end deffn @node Binding constructs