From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marius via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Newsgroups: gmane.lisp.guile.bugs Subject: bug#72347: Mismatch between documentation and real implementation of list-index Date: Mon, 29 Jul 2024 00:34:14 +0000 Message-ID: <18A0D20D-B19C-44AF-8BE7-486CE2DF6844@disroot.org> Reply-To: Marius Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=----9M2U8DRVWE37VAXSQZ14Y0B1PTDAJQ Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5071"; mail-complaints-to="usenet@ciao.gmane.io" To: 72347@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Jul 29 08:30:11 2024 Return-path: Envelope-to: guile-bugs@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 1sYJta-0001A2-G6 for guile-bugs@m.gmane-mx.org; Mon, 29 Jul 2024 08:30:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYJtN-0001uS-Qt; Mon, 29 Jul 2024 02:29:58 -0400 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 1sYJtH-0001tN-OJ for bug-guile@gnu.org; Mon, 29 Jul 2024 02:29:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYJtG-00042S-NS for bug-guile@gnu.org; Mon, 29 Jul 2024 02:29:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=ah8FtfmGijL2YoMQaA1RWMJ6yuXKt8qTGSt1DZ4iH+g=; b=q03klMqJr04OFP8ys9/oaf+DP4WcvDxX6XcMNbHkYZ2m/y+J5tUOcCv627n4Py9tja2Pm6Oh6fLY8lB92O3uxjO2JDP+vAX0ktS7CR1MpDZJBIh698GLS95tc9YCsgSzoH2nyaK5I6L7MJ3bz9pTHshAkN2egneZdqDXPo9hJBH7CI03pnRh7fyJCX358c/ly9yMDapvjXyQ5L2OWa4QjpdWt8OPzV3BnFL0GwieQTL2U2KPaU3QWSFgNZbmY6VzPIKoQT0DETpKJsaINwdJjgINQkkqvgDliUKhA7NE2XFR7KSDZ2Fe3eByR6rMYwpuGui9V3m5hkOcwLYMGZunDQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYJtS-0001bx-5w for bug-guile@gnu.org; Mon, 29 Jul 2024 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Marius Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 29 Jul 2024 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72347 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17222345946144 (code B ref -1); Mon, 29 Jul 2024 06:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jul 2024 06:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:44771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYJtG-0001ax-Cf for submit@debbugs.gnu.org; Mon, 29 Jul 2024 02:29:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYELW-0000nf-Qo for submit@debbugs.gnu.org; Sun, 28 Jul 2024 20:34:40 -0400 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 1sYELH-0007pr-TL for bug-guile@gnu.org; Sun, 28 Jul 2024 20:34:25 -0400 Original-Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYELF-0006EE-Kx for bug-guile@gnu.org; Sun, 28 Jul 2024 20:34:23 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E147541093 for ; Mon, 29 Jul 2024 02:34:17 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zyOggWRzLy8o for ; Mon, 29 Jul 2024 02:34:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1722213256; bh=ah8FtfmGijL2YoMQaA1RWMJ6yuXKt8qTGSt1DZ4iH+g=; h=Date:From:To:Subject; b=c/psb5oW0jJ490NxCEYEwtLUZOBhJkwxLC083QkXYavmNVRdHQ2Vve0epDeav4XS3 4SRnouU6dSXRU1f+HN9fRM5Jd84LCHi8SgqCNqZKLZ/PTDTu1wpuY2CBgIB8/z1TOV BYZ64GiNgCjs2cIbvpfM0a9+VFuDirwtjaYpDjnaWXMvKmnEpH4DNwzwGIwyNO6kol PceVauYRVYy6vaFLXJdEKGd5Wtx1/C0kWZvIiO/tiXsQcXIRcePi4wq7ZkVMm8K9tH XKlgYzNbEpR130n8RZmXNsVynMw4Gqvrl4Aon/N59hFCVVoWROndmF7tImwB4pxq/l xbf98nJQINOaQ== Autocrypt: addr=mariusgr@disroot.org; keydata= mQINBGS1j68BEADba422smkwUlrzTfPMzt5Ac0k/9s6yRpREK/08LK1kMSq0Q+f5We95sQltvoK+ oF9OJEllemyj4HK5Boj3N+IyGzSQwMyneM+BFAOHysU0Tmo0Kpu0Vro0plTV3xakyfi+wEkVwxVq 3Jg9SyxzzNpFk0kOP3vzzZPtlic23vcBIzmOd/EFmxvPJ6QWAPC473neiqrEaIE1hJ6adOVP6vtt 758zzgesSY3yOlBgc/GsOStGkNrNaujnx9vo9tXBDYyh0gqTwZRkUs7QFf1gVCs36V1kbKR8XqIU tpiJ/MrGuYQZ/Yz+MDEvLwv4BLKI/p+yFT+u6ORFYU4iYee1Iu3FKylK3f4OthxeJ3SPlVC6TR5Y O2GaFONesxCWf6phey05MbxwVmYLfLAly9KKsFww2+KFUReycBnx9l3Q8hBScWN7CoTN6rKbaQCM /ob6HRwvPnmXS0t6R1YJEptyW9gf0NkUBRa6dusQA8PwuvLIKmhYJSGwvxIY5+b0mnhuq9Dn8vLi lt0qH9lZVgB56j5mhSrjIbk2k3tBUjxYUj0m0JVRFtOdQbUp7RzZY9jTxzhyRNZ/nQHnbtJiF4VE PqMb5NMKKXfqk4RpilIKLUlsjIrJk6YbuDYn0BirbwICGuG7NXtoG2rcHjAY0yrZlNXbgjKo08Dx ZFwkUpB4rj5Q9wARAQABtDhNYXJpdXMgR3V0acOpcnJleiBSb2NhIChQZXJzb25hbCkgPG1hcml1 c2dyQGRpc3Jvb3Qub3JnPokCTgQTAQoAOBYhBHsR+KwpKiDzXNvVZmB6oLBP/om2BQJkta3B Received-SPF: pass client-ip=178.21.23.139; envelope-from=mariusgr@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 29 Jul 2024 02:29:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10911 Archived-At: ------9M2U8DRVWE37VAXSQZ14Y0B1PTDAJQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Good evening, I don't know if this is actually a Guile bug or a documentation bug, but I= 'm currently learning Guile from the "Guile reference manual" and I've foun= d a mismatch between what the documentation says and what "my" guile does= =2E I use Guile 3=2E0=2E9=2E In my Guile instance (from what I can deduce), last-index is a procedure t= hat returns the index of the first element of a list that matches with a s-= expresion=2E For example: (list-index '(1 2 3) 3) -> 2 (list-index '(height width) 'width) -> 1 But the documentation says otherwise (): list-index pred lst1 lst2 =2E=2E=2E Returns the index of the first set of elements, one from each of lst1 lst2= =2E=2E=2E, which satisfies pred=2E If I try to run list-index examples (from the documentation) I get an erro= r because it doesn't know how to deal with a procedure as the first argumen= t=2E I'm missing something? I understand that list-index it's defined in SRFI-1= and maybe a Guile definition is shadowing the SRFI-1 definition=2E But whe= re is the Guile documentation for this shadowing list-index? In the Guile R= eference Manual list-index it's only described inside SRFI-1 module=2E Thank you for your help=2E Forgive me for any inconvenience, Marius=2E ------9M2U8DRVWE37VAXSQZ14Y0B1PTDAJQ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Good evening,

I don't k= now if this is actually a Guile bug or a documentation bug, but I'm current= ly learning Guile from the "Guile reference manual" and I've found a mismat= ch between what the documentation says and what "my" guile does=2E I use Gu= ile 3=2E0=2E9=2E

In my Guile instance (from what I can deduce), last= -index is a procedure that returns the index of the first element of a list= that matches with a s-expresion=2E

For example:

(list-index = '(1 2 3) 3) -> 2
(list-index '(height width) 'width) -> 1

B= ut the documentation says otherwise (<https://www=2Egnu=2Eorg/software/guile//manual/guile=2Ehtml#SRFI_002d1-Fil= tering-and-Partitioning>):

list-index pred lst1 lst2 =2E=2E= =2E

Returns the index of the first set of elements, one from each of= lst1 lst2 =2E=2E=2E, which satisfies pred=2E


If I try to run li= st-index examples (from the documentation) I get an error because it doesn'= t know how to deal with a procedure as the first argument=2E


I'm= missing something? I understand that list-index it's defined in SRFI-1 and= maybe a Guile definition is shadowing the SRFI-1 definition=2E But where i= s the Guile documentation for this shadowing list-index? In the Guile Refer= ence Manual list-index it's only described inside SRFI-1 module=2E

<= br>
Thank you for your help=2E

Forgive me for any inconvenience,<= br>Marius=2E


------9M2U8DRVWE37VAXSQZ14Y0B1PTDAJQ--