Subject: Re: [N]TRUNCATE-LIST ?
From: Erik Naggum <>
Date: 2000/02/11
Newsgroups: comp.lang.lisp
Message-ID: <>

* Philip Lijnzaad <>
| after some browsing in the HyperSpec, I couldn't find a function that yields,
| as a list, the first N elts of the list passed as an argument, sort of the
| opposites of [N]BUTLAST.

  have you looked at SUBSEQ for the non-destructive version?  or a fairly
  plain SETF of NTHCDR for a destructive version?  if you have to check for
  the length, use NTHCDR, see if you get a cons cell, then SETF its CDR.
  there's absolutely _no_ need to check the length of the list, which,
  incidentally, may be circular, so use LIST-LENGTH instead of LENGTH if
  you think you really have to.