[cl-utilities-devel] Patch to add nconc-style collection to COLLECTING and WITH-COLLECTORS. Also, better return value for COLLECT.
Hexstream
hexstream at gmail.com
Mon Oct 11 00:28:26 UTC 2010
The enhancements are:
* The addition of an NCOLLECT local function to COLLECTING for
NCONC-style accumulation. Likewise, WITH-COLLECTORS now defines a
function for this kind of accumulation, whose name is the name of
the accumulator prepended with N (so for collector MY-LIST, it
would be NMY-LIST). There's a very small possibility of name conflicts if for
example a collector would have been named CONC, but I don't think it will
matter in practice.
* Making COLLECT return the passed-in value, instead of
unhelpfully returning the new last cons of the list, which will
be destructively modified on the next COLLECT (I think the
intended semantics here was that the value is undefined).
* And the required upgrades to the source code documentation. All
that would be left to do to fully integrate my contribution is
updating the HTML documentation and exporting NCOLLECT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collecting.lisp.diff
Type: text/x-patch
Size: 2989 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-utilities-devel/attachments/20101010/7f4944eb/attachment.bin>
More information about the cl-utilities-devel
mailing list