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 | README

commit b4a75a4449151952c1d63d4d4234e448d20daae1
parent 9322c3efa204d190ce82225a3d85d9a22929783a
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Wed,  7 Feb 2024 21:50:08 -0500

Procedures: Concept indexing.

Diffstat:
Mdoc/r7rs-small/procedures/booleans.texinfo | 5+++++
Mdoc/r7rs-small/procedures/bytevectors.texinfo | 2++
Mdoc/r7rs-small/procedures/control-features.texinfo | 2++
Mdoc/r7rs-small/procedures/exceptions.texinfo | 2++
Mdoc/r7rs-small/procedures/input-and-output.texinfo | 2++
Mdoc/r7rs-small/procedures/numbers.texinfo | 4++++
Mdoc/r7rs-small/procedures/pairs-and-lists.texinfo | 10++++++++++
Mdoc/r7rs-small/procedures/strings.texinfo | 4++++
Mdoc/r7rs-small/r7rs-small.texinfo | 4++++
9 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/doc/r7rs-small/procedures/booleans.texinfo b/doc/r7rs-small/procedures/booleans.texinfo @@ -1,6 +1,9 @@ @node Booleans @section Booleans +@cindex true +@cindex false + 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 @@ -14,6 +17,8 @@ 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. +@cindex empty list + 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}. diff --git a/doc/r7rs-small/procedures/bytevectors.texinfo b/doc/r7rs-small/procedures/bytevectors.texinfo @@ -6,6 +6,8 @@ sequences of bytes, where a @dfn{byte} is an exact integer in the range from 0 to 255 inclusive. A bytevector is typically more space-efficient than a vector containing the same values. +@cindex valid indexes + The @dfn{length} of a bytevector is the number of elements that it contains. This number is a non-negative integer that is fixed when the bytevector is created. The @dfn{valid indexes} of a bytevector are diff --git a/doc/r7rs-small/procedures/control-features.texinfo b/doc/r7rs-small/procedures/control-features.texinfo @@ -231,6 +231,8 @@ runs out. It is an error for @var{proc} to mutate any of the vectors. It is an error if @var{proc} does not accept one argument. +@cindex escape procedure + The procedure @code{call-with-current-continuation} (or its equivalent abbreviation @code{call/cc}) packages the current continuation (see the rationale below) as an ``escape procedure'' and passes it as an diff --git a/doc/r7rs-small/procedures/exceptions.texinfo b/doc/r7rs-small/procedures/exceptions.texinfo @@ -11,6 +11,8 @@ the action the program takes when an exceptional situation is signaled. The system implicitly maintains a current exception handler in the dynamic environment. +@cindex current exception handler + The program raises an exception by invoking the current exception handler, passing it an object encapsulating information about the exception. Any procedure accepting one argument can serve as an diff --git a/doc/r7rs-small/procedures/input-and-output.texinfo b/doc/r7rs-small/procedures/input-and-output.texinfo @@ -10,6 +10,8 @@ @node Ports @subsection Ports +@cindex port + Ports represent input and output devices. To Scheme, an input port is a Scheme object that can deliver data upon command, while an output port is a Scheme object that can accept data. Whether the input and diff --git a/doc/r7rs-small/procedures/numbers.texinfo b/doc/r7rs-small/procedures/numbers.texinfo @@ -1,6 +1,8 @@ @node Numbers @section Numbers +@cindex number + It is important to distinguish between mathematical numbers, the Scheme numbers that attempt to model them, the machine representations used to implement the Scheme numbers, and notations used to write numbers. This @@ -764,6 +766,8 @@ a NaN, then it is returned. @deffn procedure rationalize x y +@cindex simplest rational + @c TODO: Math mode is probably overkill here. Use normal insertions? The @code{rationalize} procedure returns the @emph{simplest} rational number differing from @var{x} by no more than @var{y}. A rational diff --git a/doc/r7rs-small/procedures/pairs-and-lists.texinfo b/doc/r7rs-small/procedures/pairs-and-lists.texinfo @@ -8,6 +8,8 @@ cdr fields are accessed by the procedures @code{car} and @code{cdr}. The car and cdr fields are assigned by the procedures @code{set-car!} and @code{set-cdr!}. +@cindex empty list + Pairs are used primarily to represent lists. A @dfn{list} can be defined recursively as either the empty list or a pair whose cdr is a list. More precisely, the set of lists is defined as the smallest set @var{X} @@ -30,6 +32,8 @@ car is the first element and whose cdr is a pair whose car is the second element and whose cdr is the empty list. The length of a list is the number of elements, which is the same as the number of pairs. +@cindex empty list + The empty list is a special object of its own type. It is not a pair, it has no elements, and its length is zero. @@ -43,6 +47,8 @@ the cdr field. For example @code{(4 . 5)} is a pair whose car is 4 and whose cdr is 5. Note that @code{(4 . 5)} is the external representation of a pair, not an expression that evaluates to a pair. +@cindex empty list + A more streamlined notation can be used for lists: the elements of the list are simply enclosed in parentheses and separated by spaces. The empty list is written @code{()}. For example, @@ -134,6 +140,8 @@ Returns a newly allocated pair whose car is @vari{obj} and whose cdr is @deffn procedure car pair +@cindex empty list + Returns the contents of the car field of @var{pair}. Note that it is an error to take the car of the empty list. @@ -214,6 +222,8 @@ Arbitrary compositions up to four deep are provided. @deffn procedure null? obj +@cindex empty list + Returns @code{#t} if @var{obj} is the empty list, otherwise returns @code{#f}. diff --git a/doc/r7rs-small/procedures/strings.texinfo b/doc/r7rs-small/procedures/strings.texinfo @@ -1,6 +1,8 @@ @node Strings @section Strings +@cindex escape sequence + Strings are sequences of characters. Strings are written as sequences of characters enclosed within quotation marks (@code{"}). Within a string literal, various escape sequences represent characters other @@ -65,6 +67,8 @@ Examples: "\x03B1; is named GREEK SMALL LETTER ALPHA." @end example +@cindex valid indexes + The @dfn{length} of a string is the number of characters that it contains. This number is an exact, non-negative integer that is fixed when the string is created. The @dfn{valid indexes} of a string are the diff --git a/doc/r7rs-small/r7rs-small.texinfo b/doc/r7rs-small/r7rs-small.texinfo @@ -303,6 +303,10 @@ described in the previous section. @node Standard procedures @chapter Standard procedures +@cindex initial environment +@cindex global environment +@cindex procedure + This chapter describes Scheme's built-in procedures. The procedures @code{force}, @code{promise?}, and @code{make-promise}