[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ice-9 async-queue
From: |
Andy Wingo |
Subject: |
Re: ice-9 async-queue |
Date: |
Tue, 07 Feb 2012 09:36:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
On Mon 06 Feb 2012 23:09, Mike Gran <address@hidden> writes:
> maybe either (ice-9 q) or (ice-9 async-queue) could become a
> generalized version and the other could become a specific version or
> the same codebase.
I forgot to mention the other way: ice-9 q can't be a specific version
of anything else, because its implementation is exposed as its
interface:
A queue is implemented as a cons cell, the `car' containing a list
of queued elements, and the `cdr' being the last cell in that list (for
ease of enqueuing).
(LIST . LAST-CELL)
If the queue is empty, LIST is the empty list and LAST-CELL is `#f'.
An application can directly access the queue list if desired, for
instance to search the elements or to insert at a specific point.
Cheers,
Andy
--
http://wingolog.org/