guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cons* and append!


From: Andreas Rottmann
Subject: Re: cons* and append!
Date: Fri, 13 Feb 2004 21:05:00 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Brian S McQueen <address@hidden> writes:

> I few weeks back I asked abit about list building and I got some helpful
> responses.  The operator cons* was recommended to me.  Well I noticed
> append! yesterday.  Does anyone have any comments on this?  It seems an
> excellent way of extending proper lists without copying or reallocating
> elements, since it merely clobbers the trailing null list of one list and
> inserts the car of the appended list in its place.  Are there some hidden
> expenses I am unaware of?  Does it have to walk the entire length of the
> first list to find the end?
>
Yes, append! will have to walk all the lists but the last. All you
save is copying them.

Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]