Re: Something to ponder...

Subject: Re: Something to ponder...
From: James Clark <jjc@xxxxxxxxxx>
Date: Wed, 23 Apr 1997 13:41:48 +0700
At 17:28 22/04/97 -0400, David Megginson wrote:
>Here's a nice problem for the more abstract-minded DSSSL enthusiasts
>among you.
>
>Assume that I have three singleton node-lists, "a", "b", and "c".
>
>I append the lists using the `node-list' primitive, but in different
>orders:
>
>  (let ((nl1 (node-list a b c))
>        (nl2 (node-list b c a)))
>    ...)
>
>Clause 10.1.2 states that `node-list=?' "returns #t if nl1 and nl2 are
>the same node-list, that is, they contain the same members in the same
>order, and otherwise returns #f."  Given that definition, the
>following query should obviously return #f:
>
>  (node-list=? nl1 nl2)
>
>But it's not clear (at least, not to me) what this query should
>return:
>
>  (node-list=? (node-list-no-order nl1) (node-list-no-order nl2))

An implementation may legally return either #t or #f (but not anything else)
in this case.

James



Current Thread