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 f2937728cc4b938a7ba99da67b0ac336c495363f
parent cc4001143d7de4e03485c1c8f5e8b3f4f6e0a184
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Fri,  2 Feb 2024 13:14:17 -0500

Fix doubled @var macros.

Oops.

Diffstat:
Mdoc/r7rs-small/procedures/equivalence-predicates.texinfo | 126++++++++++++++++++++++++++++++++++++++++---------------------------------------
1 file changed, 64 insertions(+), 62 deletions(-)

diff --git a/doc/r7rs-small/procedures/equivalence-predicates.texinfo b/doc/r7rs-small/procedures/equivalence-predicates.texinfo @@ -1,20 +1,21 @@ @node Equivalence predicates @section Equivalence predicates -A @dfn{predicate} is a procedure that always returns a boolean -value (@code{#t} or @code{#f}). An @dfn{equivalence predicate} is -the computational analogue of a mathematical equivalence relation; it is +A @dfn{predicate} is a procedure that always returns a boolean value +(@code{#t} or @code{#f}). An @dfn{equivalence predicate} is the +computational analogue of a mathematical equivalence relation; it is symmetric, reflexive, and transitive. Of the equivalence predicates described in this section, @code{eq?} is the finest or most discriminating, @code{equal?} is the coarsest, and @code{eqv?} is -slightly less discriminating than @code{eq?}. +slightly less discriminating than @code{eq?}. @deffn procedure eqv? @var{obj@sub{1}} @var{obj@sub{2}} -The @code{eqv?} procedure defines a useful equivalence relation on objects. Briefly, it returns @code{#t} -if -@var{@var{obj@sub{1}}} and @var{@var{obj@sub{2}}} are normally regarded as the same object. This relation is left slightly open to -interpretation, but the following partial specification of @code{eqv?} holds for all implementations +The @code{eqv?} procedure defines a useful equivalence relation on +objects. Briefly, it returns @code{#t} if @var{obj@sub{1}} and +@var{obj@sub{2}} are normally regarded as the same object. This +relation is left slightly open to interpretation, but the following +partial specification of @code{eqv?} holds for all implementations of Scheme. The @code{eqv?} procedure returns @code{#t} if: @@ -22,42 +23,43 @@ The @code{eqv?} procedure returns @code{#t} if: @itemize @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both @code{#t} or both @code{#f}. +@var{obj@sub{1}} and @var{obj@sub{2}} are both @code{#t} or +both @code{#f}. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both symbols and are the same symbol according to the @code{symbol=?} procedure - (@ref{Symbols}). +@var{obj@sub{1}} and @var{obj@sub{2}} are both symbols and +are the same symbol according to the @code{symbol=?} procedure +(@ref{Symbols}). @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both exact numbers and are numerically equal (in the sense of @code{=}). +@var{obj@sub{1}} and @var{obj@sub{2}} are both exact +numbers and are numerically equal (in the sense of @code{=}). @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both inexact numbers such that they are numerically equal (in the sense of @code{=}) - and they yield the same results (in the sense of @code{eqv?}) when passed as arguments to any - other procedure that can be defined as a finite composition of Scheme's standard - arithmetic procedures, provided it does not result in a NaN value. +@var{obj@sub{1}} and @var{obj@sub{2}} are both inexact +numbers such that they are numerically equal (in the sense of @code{=}) +and they yield the same results (in the sense of @code{eqv?}) when +passed as arguments to any other procedure that can be defined as a +finite composition of Scheme's standard arithmetic procedures, provided +it does not result in a NaN value. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both characters and are the same character according to the @code{char=?} procedure - (@ref{Characters}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are both characters and are the same character according to the @code{char=?} procedure +(@ref{Characters}). @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both the empty list. +@var{obj@sub{1}} and +@var{obj@sub{2}} are both the empty list. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are pairs, vectors, bytevectors, records, or strings that denote the same location in - the store (@ref{Storage model}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are pairs, vectors, bytevectors, records, or strings that denote the same location in +the store (@ref{Storage model}). @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are procedures whose location tags are equal (@ref{Procedures}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are procedures whose location tags are equal (@ref{Procedures}). @end itemize @@ -66,55 +68,55 @@ The @code{eqv?} procedure returns @code{#f} if: @itemize @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are of different types (@ref{Disjointness of types}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are of different types (@ref{Disjointness of types}). @item one of - @var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} is @code{#t} but the other is @code{#f}. +@var{obj@sub{1}} and +@var{obj@sub{2}} is @code{#t} but the other is @code{#f}. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are symbols but are not the same symbol according to the @code{symbol=?} procedure - (@ref{Symbols}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are symbols but are not the same symbol according to the @code{symbol=?} procedure +(@ref{Symbols}). @item one of - @var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} is an exact number but the other is an inexact number. +@var{obj@sub{1}} and +@var{obj@sub{2}} is an exact number but the other is an inexact number. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both exact numbers and are numerically unequal (in the sense of @code{=}). +@var{obj@sub{1}} and +@var{obj@sub{2}} are both exact numbers and are numerically unequal (in the sense of @code{=}). @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are both inexact numbers such that either they are numerically unequal (in the - sense of @code{=}), or they do not yield the same results (in the sense of @code{eqv?}) when passed as - arguments to any other procedure that can be defined as a finite composition of - Scheme's standard arithmetic procedures, provided it does not result in a NaN value. As - an exception, the behavior of @code{eqv?} is unspecified when both - @var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are NaN. +@var{obj@sub{1}} and +@var{obj@sub{2}} are both inexact numbers such that either they are numerically unequal (in the +sense of @code{=}), or they do not yield the same results (in the sense of @code{eqv?}) when passed as +arguments to any other procedure that can be defined as a finite composition of +Scheme's standard arithmetic procedures, provided it does not result in a NaN value. As +an exception, the behavior of @code{eqv?} is unspecified when both +@var{obj@sub{1}} and +@var{obj@sub{2}} are NaN. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are characters for which the @code{char=?} procedure returns @code{#f}. +@var{obj@sub{1}} and +@var{obj@sub{2}} are characters for which the @code{char=?} procedure returns @code{#f}. @item one of - @var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} is the empty list but the other is not. +@var{obj@sub{1}} and +@var{obj@sub{2}} is the empty list but the other is not. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are pairs, vectors, bytevectors, records, or strings that denote distinct locations. +@var{obj@sub{1}} and +@var{obj@sub{2}} are pairs, vectors, bytevectors, records, or strings that denote distinct locations. @item -@var{@var{obj@sub{1}}} and - @var{@var{obj@sub{2}}} are procedures that would behave differently (return different values or have - different side effects) for some arguments. +@var{obj@sub{1}} and +@var{obj@sub{2}} are procedures that would behave differently (return different values or have +different side effects) for some arguments. @end itemize @@ -250,10 +252,10 @@ differently from @code{eqv?}. @end example Rationale: It will usually be possible to implement @code{eq?} much more efficiently than - @code{eqv?}, for example, as a simple pointer comparison instead of as some more - complicated operation. One reason is that it is not always possible to compute @code{eqv?} - of two numbers in constant time, whereas @code{eq?} implemented as pointer comparison - will always finish in constant time. +@code{eqv?}, for example, as a simple pointer comparison instead of as some more +complicated operation. One reason is that it is not always possible to compute @code{eqv?} +of two numbers in constant time, whereas @code{eq?} implemented as pointer comparison +will always finish in constant time. @end deffn