References: BUTLAST (p271), NBUTLAST (p271)
Edit history: 01-Mar-91, Version 1 by Pitman
Status: For X3J13 consideration
What happens if the second argument to BUTLAST and NBUTLAST is negative?
Specify that if the second argument, N, to BUTLAST or NBUTLAST is negative,
then an error `should be signalled'.
1. (BUTLAST '(A B C) -2)
2. (LET ((X (LIST 'A 'B 'C)))
(NBUTLAST X -2))
Mostly this precludes implementations from adopting other,
1. Symbolics Genera returns (A B C NIL NIL).
2. Symbolics Genera signals an error.
Cost to Implementors:
Cost to Users:
None. Portable programs cannot currently rely on any particular
Cost of Non-Adoption:
Users would be confused about what to expect because implementations might
adopt creative interpretations (such as Genera's) which are not supported
in other implementations and so become a barrier to portability.
Genera's alternate interpretation of BUTLAST is arguably aesthetic, but
does not extend well to NBUTLAST. The interpretation proposed here makes
BUTLAST and NBUTLAST more consistent.
Pitman supports this proposal.