[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: space leak from `values'
From: |
Miles Bader |
Subject: |
Re: space leak from `values' |
Date: |
Thu, 29 Jul 2004 18:06:43 +0900 |
address@hidden (Kim F. Storm) writes:
>> What's wrong with (setcdr (nthcdr (1- N) LIST) VALUE) ?
>
> Read the third line of the doc string:
>
>> If list has less than N elements, do not modify list.
>
> Your suggestion fails if N is less than the length of the list:
It's trivial to handle though that -- just see if the result of `nthcdr'
is nil, and only do the `setcdr' if not. Adding a C function for this
rather rare operation just seems kinda like pointless bloat...
-Miles
--
Run away! Run away!