Thomas A. Russ wrote:
Well if you alway use these two functions together, it would be more
efficient to generate both the results at once:
...
The case could be made either way for this one, though, and certainly
it would be better in terms of efficiency; thanks again for the suggestion.
...
(defun split-on-corpus (atoms preprocessed-corpus)
(loop :for atom :in atoms
:if (gethash atom preprocessed-corpus)
:collect atom :into present
:else :collect atom :into absent
:finally (return (list present absent))))
Gauche Scheme:
(define (split-on-corpus atoms corpus)
(partition
(pa$ hash-table-exists? corpus)
atoms))
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)