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

From: Taylan Kammer <[email-masked]>
Date: Tue, 1 Jun 2021 02:49:36 +0200

On 31.05.2021 23:44, [email-masked] 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-masked]
> 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