[r6rs-discuss] equal? and infinite lists

William D Clinger will at ccs.neu.edu
Thu Sep 27 23:00:52 EDT 2007


Aziz quoting the R5.97RS draft:

>     equal? returns #t if and only if the (possibly infinite)
>     unfolding of its arguments into regular trees are equal
>     as ordered trees.
>
> I don't understand that sentence.  What should the value of
> the following two expressions be?
>
> (equal? ;;; two infinite lists of 1s
>    (inflist 1)
>    (cons 1 (inflist 1)))
>
> (equal? ;;; two infinite lists of 1s
>          ;;; with different "periods"
>    (inflist 1)
>    (inflist 1 1))

#t

Will



More information about the r6rs-discuss mailing list