Re: Having trouble deleting first item in list



If you're always deleting the first item in the list you could just do
:

(defun delete-first( lst )
(cdr lst))

(setf lst '( a b c 1 2 3 ))

(setf lst (delete-first lst))

.



Relevant Pages

  • Re: specific remove
    ... (defun remove-nth(n lst) ... Prev by Date: ...
    (comp.lang.lisp)
  • Re: Searching with find
    ... (defun test-itx2 (lst el) ... or more concise) way of doing this? ... Prev by Date: ...
    (comp.lang.lisp)
  • Re: RED DEVIL has a bare faced cheek!
    ... >>> feel to have your group invaded like ours has been for the lst 9 ... You should have seen their group building up to the game - tumbleweeds ... blowing through it. ... Prev by Date: ...
    (uk.sport.football.clubs.liverpool)
  • Re: RED DEVIL has a bare faced cheek!
    ... >>> feel to have your group invaded like ours has been for the lst 9 ... You should have seen their group building up to the game - tumbleweeds ... blowing through it. ... Prev by Date: ...
    (uk.sport.football.clubs.liverpool)
  • Re: Grouping list elements
    ... (break-n-lst n lst (length lst))) ... (defun break-n-lst(n lst len) ... Prev by Date: ...
    (comp.lang.lisp)