Howdy!

Without further ado, using s7:

Given

   λ (define-record-type <foo> (make-foo) foo?)
   <foo>

we get

   λ (equal? (make-foo) (make-foo))
   #t

as expected.  But

   λ (member (make-foo) (list (make-foo)))
   #f

which violates the R7RS requirement

   [...] `member' uses `compare', if given, and `equal?' otherwise.

As a side note,

   λ (member (make-foo) (list (make-foo)) equal?)
   ((inlet '{gensym}-1 <foo>))

as expected.

Rudy
-- 
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981

Rudolf Adamkovič <[email protected]> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to