bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found

Taylan Kammer <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
On 31.05.2021 23:44, [email protected] wrote:
> In git main it appears to work but with a warning:
> 
> $ guile --r7rs
> GNU Guile 3.0.7.13-c1fd55-dirty
> ...
> 
> scheme@(guile-user)> (import (scheme base))
> scheme@(guile-user)> (member 'a '(b))
> WARNING: (guile-user): imported module (scheme base) overrides core binding `member'
> $1 = #f
> scheme@(guile-user)> (member 'a '(b a))
> $2 = (a)
> 
> 
> -Dale
> 
> 
> -----------------------------------------
> 
> From: "Arvydas Silanskas"
> To: [email protected]
> Cc:
> Sent: Monday May 31 2021 5:10:12PM
> Subject: bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found
> 
> Default `member` works fine:
> 
> $ guile
>> (member 'a '(b)) $1 = #f
> 
> However, using scheme base it returns empty list
> $ guile --r7rs
>> (import (scheme base))
>> (member 'a '(b))
> $1 = ()
> Other functions (memq, memv) seem to work fine.
> I am using version 3.0.5 as distributed by debian bullseye

The fix for this was part of the 3.0.6 release. :-)

Older report on the same bug:

https://bugs.gnu.org/43304

The warning can be safely ignored, and I believe it won't appear
when writing an R7RS library using 'define-library'.

Closing this report but feel free to ask further questions.

-- 
Taylan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.