unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found
@ 2021-05-31 21:07 Arvydas Silanskas
  2021-05-31 21:44 ` dsmich
  0 siblings, 1 reply; 3+ messages in thread
From: Arvydas Silanskas @ 2021-05-31 21:07 UTC (permalink / raw)
  To: 48765

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

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

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

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

* bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found
  2021-05-31 21:07 bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found Arvydas Silanskas
@ 2021-05-31 21:44 ` dsmich
  2021-06-01  0:49   ` Taylan Kammer
  0 siblings, 1 reply; 3+ messages in thread
From: dsmich @ 2021-05-31 21:44 UTC (permalink / raw)
  To: 'Arvydas Silanskas'; +Cc: '48765@debbugs.gnu.org'

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

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: 48765@debbugs.gnu.org
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


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

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

* bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found
  2021-05-31 21:44 ` dsmich
@ 2021-06-01  0:49   ` Taylan Kammer
  0 siblings, 0 replies; 3+ messages in thread
From: Taylan Kammer @ 2021-06-01  0:49 UTC (permalink / raw)
  To: dsmich, 'Arvydas Silanskas'; +Cc: '48765-done@debbugs.gnu.org'

On 31.05.2021 23:44, dsmich@roadrunner.com 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: 48765@debbugs.gnu.org
> 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





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

end of thread, other threads:[~2021-06-01  0:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 21:07 bug#48765: `member` from (scheme base) returns empty list instead of #f when item is not found Arvydas Silanskas
2021-05-31 21:44 ` dsmich
2021-06-01  0:49   ` Taylan Kammer

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git