unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#72347: Mismatch between documentation and real implementation of list-index
@ 2024-07-29  0:34 Marius via Bug reports for GUILE, GNU's Ubiquitous Extension Language
  2024-07-29 10:28 ` Tomas Volf
  0 siblings, 1 reply; 3+ messages in thread
From: Marius via Bug reports for GUILE, GNU's Ubiquitous Extension Language @ 2024-07-29  0:34 UTC (permalink / raw)
  To: 72347

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

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 found a mismatch between what the documentation says and what "my" guile does. I use Guile 3.0.9.

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.

For example:

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

But the documentation says otherwise (<https://www.gnu.org/software/guile//manual/guile.html#SRFI_002d1-Filtering-and-Partitioning>):

list-index pred lst1 lst2 ...

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


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


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. But where is the Guile documentation for this shadowing list-index? In the Guile Reference Manual list-index it's only described inside SRFI-1 module.



Thank you for your help.

Forgive me for any inconvenience,
Marius.



[-- Attachment #2: Type: text/html, Size: 1567 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-29 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29  0:34 bug#72347: Mismatch between documentation and real implementation of list-index Marius via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2024-07-29 10:28 ` Tomas Volf
2024-07-29 13:26   ` Marius via Bug reports for GUILE, GNU's Ubiquitous Extension Language

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).