zkat / chanl

Portable channel-based concurrency for Common Lisp
Other
169 stars 18 forks source link

Fix unzip-alist to actually work as the function name suggests #2

Closed hraban closed 12 years ago

hraban commented 13 years ago

The original iterative version made little sense, especially using the on keyword instead of in. It did not work as intended.

To make this work on a more friendly sibling of the alist (namely, nested lists: ((a 1) (b 2) (c 3))), use #'first and #'second instead of #'car and #'cdr, respectively.

zkat commented 13 years ago

Nice catch, although s/on/in/ should be more than sufficient to fix this. I like that it collects both lists in a single iteration.

adlai commented 12 years ago

I incorporated your changes in 1bcac34 and bf6eec2, although the iterative algorithm stays.

hraban commented 12 years ago

Aye, thanks for that. "Caring about the implementation details of internal utility function unzip-alist in the chanl project" is relatively low on my TODO-list. As you can see, I am not a difficult man.