about equal? Peter Lane (09 May 2017 21:07 UTC)
Re: about equal? John Cowan (09 May 2017 21:45 UTC)
Re: about equal? Shiro Kawai (09 May 2017 23:05 UTC)
Re: about equal? Per Bothner (09 May 2017 23:30 UTC)

Re: about equal? Per Bothner 09 May 2017 23:29 UTC

On 05/09/2017 02:06 PM, Peter Lane wrote:
> While porting the test suite to SRFI 64 and testing on R7RS implementations I found that Chibi and Sagittarius scheme worked similarly to Chicken, in that equal? naturally works with ilists. However, Gauche, Kawa and Larceny do not.

Kawa has a class gnu.lists.ImmutablePair.  It would be reasonable to use that
to implement srfi-116.  In that case equal? should work "automatically":

(define-alias <ilist> gnu.lists.ImmutablePair)

Note that ImmutablePair extends from Pair, so all ipairs are pairs
and all ilists are lists.

(define (ipair x y) (gnu.lists.ImmutablePair x y))
(define (ipair? x) (gnu.lists.ImmutablePair? x))
(define (icar p::gnu.lists.ImmutablePair) (p:getCar))
(define (icdr p::gnu.lists.ImmutablePair) (p:getCdr))

[untested ...]
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/