From: John Tang Boyland
Subject: optional arguments to last and butlast
Date: 
Message-ID: <1nnvns$pp0@agate.berkeley.edu>
I have found the new optional argument to "last" to be
quite useful, especially for returning the end of a dotted list
Here's the example from CLtL2:
	(last '(a b c . d) 0) => d
And it seems to me that butlast should work similarly:
	(butlast '(a b c . d) 0) => '(a b c)
I use the functionality of (last ... 0) and (butlast ... 0)
often for this purpose, but Allegro CL v4.1, doesn't implement
the optional parameter to "last" yet, and signals an error
for my butlast example. So I've written my own functions
last0 and butlast0 for now.

Has this issue been cleared up?  Is what I desire required
functionality or not?

John (·······@cs.berkeley.edu)

From: Barry Margolin
Subject: Re: optional arguments to last and butlast
Date: 
Message-ID: <1nqeosINNj6c@early-bird.think.com>
In article <··········@agate.berkeley.edu> ·······@CS.Berkeley.EDU (John Tang Boyland) writes:
>I use the functionality of (last ... 0) and (butlast ... 0)
>often for this purpose, but Allegro CL v4.1, doesn't implement
>the optional parameter to "last" yet, and signals an error
>for my butlast example. So I've written my own functions
>last0 and butlast0 for now.
>
>Has this issue been cleared up?  Is what I desire required
>functionality or not?

It depends on what version of Common Lisp Allegro CL claims to conform to.
Most implementations claim conformance to CLtL1 and have been adding CLtL2
and dpANS features incrementally.

The optional arguments to LAST and BUTLAST are included in dpANS CL, and I
have no reason to believe they won't be in ANSI CL when it's approved.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar
From: John Tang Boyland
Subject: Re: optional arguments to last and butlast
Date: 
Message-ID: <1o7nc9$l4f@agate.berkeley.edu>
In article <············@early-bird.think.com>, ······@think.com (Barry Margolin) writes:
|> In article <··········@agate.berkeley.edu> ·······@CS.Berkeley.EDU (John Tang Boyland) writes:
|> >I use the functionality of (last ... 0) and (butlast ... 0)
|> > [...]
|> >
|> >Has this issue been cleared up?  Is what I desire required
|> >functionality or not?
|>
|> [...]
|> 
|> The optional arguments to LAST and BUTLAST are included in dpANS CL, and I
|> have no reason to believe they won't be in ANSI CL when it's approved.
|> -- 
|> Barry Margolin
|> System Manager, Thinking Machines Corp.
|> 
|> ······@think.com          {uunet,harvard}!think!barmar

I'm afraid I wasn't very clear.  The most important part was buried
in a lot of other comments, here it is again:

|> > And it seems to me that butlast should work similarly:
|> > 	(butlast '(a b c . d) 0) => '(a b c)

Is is legal to pass a dotted list to butlast?
John (·······@cs.berkeley.edu)