From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Morley Newsgroups: gmane.lisp.guile.devel Subject: Re: [Doc] Patch: eq? and friends accepts more than two arguments Date: Sun, 6 Nov 2022 16:17:40 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile Devel To: Jean Abou Samra Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Nov 06 16:18:36 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1orhPv-0009wv-Cl for guile-devel@m.gmane-mx.org; Sun, 06 Nov 2022 16:18:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orhPO-0002If-Sx; Sun, 06 Nov 2022 10:18:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orhPJ-0002Gy-5U for guile-devel@gnu.org; Sun, 06 Nov 2022 10:18:01 -0500 Original-Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1orhPG-0007T5-La for guile-devel@gnu.org; Sun, 06 Nov 2022 10:17:56 -0500 Original-Received: by mail-pj1-x1033.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so7474558pjs.4 for ; Sun, 06 Nov 2022 07:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=D2wkptIALQFZefgZFoLanbnG5SpAmOkhu3IeWk5Nz2E=; b=Gs+n7db00TBl41rA3UDp7+aaDPj13WyG2cdDnPLS6CiqnnSR5x5Upihb+wZC0IoqjL 6ycy8qJbKcXnZY8Hea94F81tBeJdBc+/CPndLgjtUUZirlKN0Ryl6PD6rZk3DVMEE7yI a9G1kJ+zrDk0dK1c0nC8WA7F+Sub+2VnJ62xo3+QuEppxQcZfYfmICNPlKcv9y5n15G0 hdDFFGlOgFi1zPOVoR0LzkBDn1RJ2KFj00WKlGxdrDZu7sJ8LBeckChDVBUbsXvO+KEh 2VfTFisMt2q5Sb1/rRncRF6PbzTsR0/8DTO3cgMj5NHPs2ucisqV6UXEmvMCKr9TvzGa Uz9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D2wkptIALQFZefgZFoLanbnG5SpAmOkhu3IeWk5Nz2E=; b=CXBMarfCj5PylhkKU1L0eKKYZjwVdHgZP+EtBaH8QVe0EMAHVFs4ZjHtBkAMzdRadv Vm+3StA8cQbbKxC5vdqf8JicZ7G6Vo2o7jfj08gFP7rsnBtUBfznKJ6FQE7ZFi1nb+JG IgiEXvuMAvpbkeLF+yJ7zRL1j6fDqatiUQqdhz0wzWLNROVW8eOug0z8VJr446lHtSYb FyNzXr4IibKzyABTH2MhKVBrn0o7cBHIVr8YcijJdCoSqV6WLNZYOPloUIqyNhYOUohH dQi9uTZIVLqRSbQ4t2r4PWe7jrPgzBTG1jlQ22M8ZqVSckYmNoGsNqxAs/OfIecMw4+p Gy4Q== X-Gm-Message-State: ACrzQf3YLC51B0anAM4mRqlH0CjUGMr3B6q8exfZJmmnY7jr8rSCxf9F 2et5prcd3IA0rioqt8xqqPmRNsp96umlxQkSlwM= X-Google-Smtp-Source: AMsMyM5djNq8/867XjkeuwRZHiF3+xYv3DbpWiwmoo6XkCYN1LIz4uE8+VotQleoG+jQAPKe7+XI/NpxXfmbWSUnBBo= X-Received: by 2002:a17:90b:1982:b0:212:fe7f:4a49 with SMTP id mv2-20020a17090b198200b00212fe7f4a49mr64584625pjb.156.1667747873107; Sun, 06 Nov 2022 07:17:53 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=thomasmorley65@gmail.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "guile-devel" Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21467 Archived-At: Am So., 6. Nov. 2022 um 15:58 Uhr schrieb Jean Abou Samra : > > Le 06/11/2022 =C3=A0 15:47, Thomas Morley a =C3=A9crit : > > Hi, > > > > please find attached a doc-patch, clearifying eq?/eqv?/equal? are > > working with more than two arguments. > > > Well, but the signature > > eq? x y ... > > is still not correct, because (eq?) and (eq? x) are also valid. > eq? takes *any* number of arguments. > > Probably better to do: > > > > From 09177dab48dabee4b6b6ac5fe110cd56e3e6e261 Mon Sep 17 00:00:00 2001 > From: Jean Abou Samra > Date: Sun, 6 Nov 2022 15:55:24 +0100 > Subject: [PATCH] Doc: document that eq?, eqv? and equal? take any number = of > arguments > > --- > doc/ref/api-utility.texi | 29 ++++++++++++++++------------- > 1 file changed, 16 insertions(+), 13 deletions(-) > > diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi > index cb7e32f2b..27c6b42f7 100644 > --- a/doc/ref/api-utility.texi > +++ b/doc/ref/api-utility.texi > @@ -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. > > @sp 1 > -@deffn {Scheme Procedure} eq? x y > +@deffn {Scheme Procedure} eq? @dots{} > @deffnx {C Function} scm_eq_p (x, y) > @rnindex eq? > -Return @code{#t} if @var{x} and @var{y} are the same object, except > -for numbers and characters. For example, > +The Scheme procedure returns @code{#t} if all of its arguments are the > +same object, except for numbers and characters. The C function does the > +same but takes exactly two arguments. For example, > > @example > (define x (vector 1 2 3)) > @@ -109,18 +110,19 @@ The @code{=3D=3D} operator should not be used on > @code{SCM} values, an > @end deftypefn > > @sp 1 > -@deffn {Scheme Procedure} eqv? x y > +@deffn {Scheme Procedure} eqv? @dots{} > @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 > -characters and numbers the same value. > +The Scheme procedure returns @code{#t} if all of its arguments are the > +same object, or for characters and numbers the same value. The C functi= on > +is similar but takes exactly two arguments. > > 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 > -object. > +@code{eq?} above. @code{(eqv? x y)} is true if @var{x} and @var{y} are > +the same object. > > -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 > +If @var{x} and @var{y} are numbers or characters, @code{(eqv? x y)} > +compares their type and value. An exact number is not @code{eqv?} to an > inexact number (even if their value is the same). > > @example > @@ -130,11 +132,12 @@ inexact number (even if their value is the same). > @end deffn > > @sp 1 > -@deffn {Scheme Procedure} equal? x y > +@deffn {Scheme Procedure} equal? @dots{} > @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 > -contents or value are equal. > +The Scheme procedure returns @code{#t} if all of its arguments are the > +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 > contents, and does so using the same @code{equal?} recursively, > -- > 2.37.3 > > Agreed, far better. Thanks, Harm