From: Thomas Morley <thomasmorley65@gmail.com>
To: Guile Devel <guile-devel@gnu.org>
Subject: [Doc] Patch: eq? and friends accepts more than two arguments
Date: Sun, 6 Nov 2022 15:47:03 +0100 [thread overview]
Message-ID: <CABsfGyWN0h-6mmeUVeZGLTNeeSYqy3+sWeaoyyJf0BEK=qtdxA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 125 bytes --]
Hi,
please find attached a doc-patch, clearifying eq?/eqv?/equal? are
working with more than two arguments.
Cheers,
Harm
[-- Attachment #2: 0001-Document-eq-and-friends-accepts-more-than-two-argume.patch --]
[-- Type: text/x-patch, Size: 2260 bytes --]
From 23691d4ec8485169cbed0cdf64fb4d36f7daf343 Mon Sep 17 00:00:00 2001
From: Thomas Morley <thomasmorley65@gmail.com>
Date: Sun, 6 Nov 2022 15:41:50 +0100
Subject: [PATCH] Document eq? and friends accepts more than two arguments
---
doc/ref/api-utility.texi | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi
index cb7e32f2b..435fbddd2 100644
--- a/doc/ref/api-utility.texi
+++ b/doc/ref/api-utility.texi
@@ -55,7 +55,7 @@ made up of the same pairs. Such lists look the same (when printed),
and @code{equal?} will consider them the same.
@sp 1
-@deffn {Scheme Procedure} eq? x y
+@deffn {Scheme Procedure} eq? x y ...
@deffnx {C Function} scm_eq_p (x, y)
@rnindex eq?
Return @code{#t} if @var{x} and @var{y} are the same object, except
@@ -96,6 +96,13 @@ compared with @code{eq?},
(define x (string->symbol "foo"))
(eq? x 'foo) @result{} #t
@end example
+
+@code{eq?} accepts more than two arguments:
+
+@example
+(eq? 'foo 'foo 'foo) @result{} #t
+(eq? 'foo 'bar 'buzz) @result{} #f
+@end example
@end deffn
@deftypefn {C Function} int scm_is_eq (SCM x, SCM y)
@@ -109,7 +116,7 @@ The @code{==} operator should not be used on @code{SCM} values, an
@end deftypefn
@sp 1
-@deffn {Scheme Procedure} eqv? x y
+@deffn {Scheme Procedure} eqv? x y ...
@deffnx {C Function} scm_eqv_p (x, y)
@rnindex eqv?
Return @code{#t} if @var{x} and @var{y} are the same object, or for
@@ -127,10 +134,12 @@ inexact number (even if their value is the same).
(eqv? 3 (+ 1 2)) @result{} #t
(eqv? 1 1.0) @result{} #f
@end example
+
+As @code{eq?}, @code{eqv?} accepts more than two arguments.
@end deffn
@sp 1
-@deffn {Scheme Procedure} equal? x y
+@deffn {Scheme Procedure} equal? x y ...
@deffnx {C Function} scm_equal_p (x, y)
@rnindex equal?
Return @code{#t} if @var{x} and @var{y} are the same type, and their
@@ -155,6 +164,8 @@ even if their value is the same).
(equal? 1 1.0) @result{} #f
@end example
+As @code{eq?} and @code{eqv?}, @code{equal?} accepts more than two arguments.
+
Hash tables are currently only compared as per @code{eq?}, so two
different tables are not @code{equal?}, even if their contents are the
same.
--
2.34.1
next reply other threads:[~2022-11-06 14:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-06 14:47 Thomas Morley [this message]
2022-11-06 14:58 ` [Doc] Patch: eq? and friends accepts more than two arguments Jean Abou Samra
2022-11-06 15:17 ` Thomas Morley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABsfGyWN0h-6mmeUVeZGLTNeeSYqy3+sWeaoyyJf0BEK=qtdxA@mail.gmail.com' \
--to=thomasmorley65@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).