Re: Having trouble deleting first item in list
- From: Matthias Buelow <mkb@xxxxxxxxxx>
- Date: Tue, 28 Jun 2005 17:03:27 +0200
"jonathon" <j_mckitrick@xxxxxxxxxxx> writes:
>This version of the function works as expected. But when I uncomment
>the one line and comment out the setf line, it will never delete the
>first (zeroth) entry. Why is this?
Because it cannot destructively remove the first element of a list.
You'd have to adjust the references in all variables pointing to that
list instead to do so.
If you visualize it on paper with the list in box-notation, you'll see
why this is so.
mkb.
.
- Follow-Ups:
- Re: Having trouble deleting first item in list
- From: jonathon
- Re: Having trouble deleting first item in list
- From: justinhj
- Re: Having trouble deleting first item in list
- References:
- Having trouble deleting first item in list
- From: jonathon
- Having trouble deleting first item in list
- Prev by Date: Re: Having trouble deleting first item in list
- Next by Date: Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- Previous by thread: Re: Having trouble deleting first item in list
- Next by thread: Re: Having trouble deleting first item in list
- Index(es):
Relevant Pages
|