[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue: TAILP-NIL



I had promised and neglected to mail out this issue again. This is it. I've
asked ALarson@src.honeywell.com to write it up again (under the theory that
Hadden@HI-Multics.ARPA had volunteered once before.)

 
     ----- Begin Forwarded Messages -----

Date: 20 Nov 87 14:30 PST
 From: Masinter.pa
Subject: Issue: TAILP-NIL
To: Hadden@HI-Multics.ARPA
cc: Masinter
line-fold: NO

My notes say that you volunteered to write this issue up. The
proposal format required is documented at the end.

!
Issue: TAILP-NIL
Reference: Steele p.275
Category: clarification
Description:
The description of tailp in Steele differs from current implementations
in the case where the first argument is NIL. In particular, the second
sentence "Another way to look at this is tailp is true if (nthcdr n
list) is sublist, for some value of n." does not accurately describe
current practice for the case where sublist is nil.
The behavior of TAILP on circular structures is also unspecified, e.g.,
is  (tailp '() '#0=(x . #0#)) meaningful?

Proposal: TAILP-NIL:RETURN-NIL

Clarify that (TAILP NIL X) returns NIL for all lists X, and that tailp
must be true-false-indeterminate equivalent to 
(defun tailp (x y)
   (and x y (or (eq x y) (tailp x (cdr y)))))

i.e., if the second argument is circular and the first argument is not a
"tail" of the non-circular part of it, tailp may loop indefinitely.



     ----- Next Message -----

Return-Path: <@SAIL.STANFORD.EDU:Moon@STONY-BROOK.SCRC.Symbolics.COM>
Received: from SAIL.STANFORD.EDU by Xerox.COM ; 01 JUN 87 20:42:51 PDT
Received: from SCRC-STONY-BROOK.ARPA by SAIL.STANFORD.EDU with TCP; 1 Jun 87
20:41:01 PDT
Received: from EUPHRATES.SCRC.Symbolics.COM by STONY-BROOK.SCRC.Symbolics.COM
via CHAOS with CHAOS-MAIL id 161243; Mon 1-Jun-87 23:36:32 EDT
Date: Mon, 1 Jun 87 23:36 EDT
 From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
Subject: Issue: TAILP-NIL
To: CL-cleanup@Sail.stanford.edu
In-Reply-To: <870529-223659-1341@Xerox>
Message-ID: <870601233632.0.MOON@EUPHRATES.SCRC.Symbolics.COM>

I vote against releasing this issue until its writeup is in proper format.

When you write the current practice section, mention that Symbolics
follows the second of the two contradictory sentences in the tailp
writeup, hence (tailp nil <anything>) => t.  This may mean that current
practice is not uniform.

For history, you can mention that the unambiguous definition in the
MIT Lisp Machine Manual (I consulted the fourth edition) would require
(tailp nil <anything>) => nil.

I personally don't care which disambiguation is adopted.  If the writeup
includes a proposal to eliminate the function, I will vote for that, since
I've never understood what use tailp is.


     ----- End Forwarded Messages -----