From hexstream at gmail.com Mon Oct 11 00:28:26 2010 From: hexstream at gmail.com (Hexstream) Date: Sun, 10 Oct 2010 20:28:26 -0400 Subject: [cl-utilities-devel] Patch to add nconc-style collection to COLLECTING and WITH-COLLECTORS. Also, better return value for COLLECT. Message-ID: 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: From hexstream at gmail.com Tue Oct 12 13:31:35 2010 From: hexstream at gmail.com (Hexstream) Date: Tue, 12 Oct 2010 09:31:35 -0400 Subject: [cl-utilities-devel] Sorry, there were missing IGNORABLE declarations in my previous patch. Message-ID: Sorry, unfortunately my previous patch triggers warnings or notes because of the new local functions introduced. I had anticipated this problem and tested in the REPL but it seems the file compiler is a bit more strict/verbose. Of course, the correct thing to do would have been to add these IGNORABLE declarations in the first place. The patch that's attached to this message does this, it's to be applied after the first one. -------------- next part -------------- A non-text attachment was scrubbed... Name: collecting-patched.lisp.diff Type: text/x-patch Size: 572 bytes Desc: not available URL: