Re: Decent datastructure for queue operations
- From: Edi Weitz <spamtrap@xxxxxxxxxx>
- Date: Tue, 31 Jan 2006 10:53:50 +0100
On 31 Jan 2006 01:42:49 -0800, "meng" <meng234@xxxxxxxxx> wrote:
> By the way, LISP has a function `last' which points directly to the
> last item of a list without needing to traverse it.
No, that's wrong. LAST has to traverse the list and is thus an O(n)
operation.
We recently had this discussion whether it's possible for an
ANSI-compliant implementation to internally represent lists in a way
that would make your behaviour possible. I forgot the outcome but in
pratice it doesn't matter because all existing Common Lisps do it
alike.
--
Lisp is not dead, it just smells funny.
Real email: (replace (subseq "spamtrap@xxxxxxxxxx" 5) "edi")
.
- Follow-Ups:
- Re: Decent datastructure for queue operations
- From: justinhj
- Re: Decent datastructure for queue operations
- References:
- Decent datastructure for queue operations
- From: meng
- Re: Decent datastructure for queue operations
- From: mmcconnell17704
- Re: Decent datastructure for queue operations
- From: meng
- Decent datastructure for queue operations
- Prev by Date: Re: Decent datastructure for queue operations
- Next by Date: Re: Decent datastructure for queue operations
- Previous by thread: Re: Decent datastructure for queue operations
- Next by thread: Re: Decent datastructure for queue operations
- Index(es):
Relevant Pages
|