unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#21855: eq?
@ 2015-11-07 12:58 Atticus
  2015-11-08 10:23 ` tomas
  0 siblings, 1 reply; 6+ messages in thread
From: Atticus @ 2015-11-07 12:58 UTC (permalink / raw)
  To: 21855

So I wanted to try out gnu guix and thus make myself more familiar with
guile first. While running some tests I encountered a problem/bug with eq?:

$ guile -v
guile (GNU Guile) 2.1.1

$ guile
scheme@(guile-user)>
(define (multirember a lat)
  (cond
   ((null? lat) '())
   ((eq? (car lat) a) (multirember a (cdr lat)))
   (else (cons (car lat) (multirember a (cdr lat))))))
   
scheme@(guile-user)> (multirember '(a b) '(x y (a b) z (a b)))
$1 = (x y z)

So why does guile return (x y z)? I expected (x y (a b) z (a b)). I know
eq? should only be used with symbols (and thus this example is more
theoretical) but nevertheless the return value is not right, since (eq?
'(a b) '(a b)) returns #f (Btw same in guile 2.0.11).





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

end of thread, other threads:[~2016-06-24 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07 12:58 bug#21855: eq? Atticus
2015-11-08 10:23 ` tomas
2015-11-08 13:30   ` Atticus
2015-11-08 13:38     ` tomas
2015-11-09  7:57       ` Atticus
2016-06-24 15:31   ` Andy Wingo

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