mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Doc: document that eq?, eqv? and equal? take any number of arguments
This commit is contained in:
parent
beb7a2af79
commit
b54263dc98
1 changed files with 14 additions and 12 deletions
|
@ -55,11 +55,12 @@ made up of the same pairs. Such lists look the same (when printed),
|
||||||
and @code{equal?} will consider them the same.
|
and @code{equal?} will consider them the same.
|
||||||
|
|
||||||
@sp 1
|
@sp 1
|
||||||
@deffn {Scheme Procedure} eq? x y
|
@deffn {Scheme Procedure} eq? @dots{}
|
||||||
@deffnx {C Function} scm_eq_p (x, y)
|
@deffnx {C Function} scm_eq_p (x, y)
|
||||||
@rnindex eq?
|
@rnindex eq?
|
||||||
Return @code{#t} if @var{x} and @var{y} are the same object, except
|
The Scheme procedure returns @code{#t} if all of its arguments are the
|
||||||
for numbers and characters. For example,
|
same object, except for numbers and characters. The C function does the
|
||||||
|
same but takes exactly two arguments. For example,
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(define x (vector 1 2 3))
|
(define x (vector 1 2 3))
|
||||||
|
@ -109,15 +110,16 @@ The @code{==} operator should not be used on @code{SCM} values, an
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@sp 1
|
@sp 1
|
||||||
@deffn {Scheme Procedure} eqv? x y
|
@deffn {Scheme Procedure} eqv? @dots{}
|
||||||
@deffnx {C Function} scm_eqv_p (x, y)
|
@deffnx {C Function} scm_eqv_p (x, y)
|
||||||
@rnindex eqv?
|
@rnindex eqv?
|
||||||
Return @code{#t} if @var{x} and @var{y} are the same object, or for
|
The Scheme procedure returns @code{#t} if all of its arguments are the
|
||||||
characters and numbers the same value.
|
same object, or for characters and numbers the same value. The C function
|
||||||
|
is similar but takes exactly two arguments.
|
||||||
|
|
||||||
On objects except characters and numbers, @code{eqv?} is the same as
|
On objects except characters and numbers, @code{eqv?} is the same as
|
||||||
@code{eq?} above, it's true if @var{x} and @var{y} are the same
|
@code{eq?} above. @code{(eqv? x y)} is true if @var{x} and @var{y} are
|
||||||
object.
|
the same object.
|
||||||
|
|
||||||
If @var{x} and @var{y} are numbers or characters, @code{eqv?} compares
|
If @var{x} and @var{y} are numbers or characters, @code{eqv?} compares
|
||||||
their type and value. An exact number is not @code{eqv?} to an
|
their type and value. An exact number is not @code{eqv?} to an
|
||||||
|
@ -128,13 +130,13 @@ inexact number (even if their value is the same).
|
||||||
(eqv? 1 1.0) @result{} #f
|
(eqv? 1 1.0) @result{} #f
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@sp 1
|
@sp 1
|
||||||
@deffn {Scheme Procedure} equal? x y
|
@deffn {Scheme Procedure} equal? @dots{}
|
||||||
@deffnx {C Function} scm_equal_p (x, y)
|
@deffnx {C Function} scm_equal_p (x, y)
|
||||||
@rnindex equal?
|
@rnindex equal?
|
||||||
Return @code{#t} if @var{x} and @var{y} are the same type, and their
|
The Scheme procedure returns @code{#t} if all of its arguments are the
|
||||||
contents or value are equal.
|
same type, and their contents or value are equal. The C function is
|
||||||
|
similar, but takes exactly two arguments.
|
||||||
|
|
||||||
For a pair, string, vector, array or structure, @code{equal?} compares the
|
For a pair, string, vector, array or structure, @code{equal?} compares the
|
||||||
contents, and does so using the same @code{equal?} recursively,
|
contents, and does so using the same @code{equal?} recursively,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue