Subject: bug#21782: 25.0.50; New functions nfront/front

From: Michael Heerdegen <[email-masked]>
Date: Fri, 30 Oct 2015 15:09:10 +0100

"Constantino Calancha" <[email-masked]> writes:

> Im sorry Michael, but i dont see your point: do you mean the fact to
> call nreverse twice?  nreverse is in fact very efficient; and last
> already use nthcdr in its implementation.

`nreverse` efficiently does what is supposed to do, yes.  But it is
O(l), where l is the length of the list arg.

In addition, the newly created `nreverse'd list must be garbage
collected.

The `copy-sequence' call in `front' is bad for the same reason.

OTOH nfront can be implemented in O(n), where n is the number argument
to nfront.

Michael.