From a923121f1afb12f83abacb3e58dfc0628afd82c8 Mon Sep 17 00:00:00 2001
From: "Robert P. Goldman" <rpgoldman@real-time.com>
Date: Tue, 8 Jun 2010 08:25:47 -0500
Subject: [PATCH] Docstring for WHILE-COLLECTING.

---
 asdf.lisp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/asdf.lisp b/asdf.lisp
index 859d93c3..17208148 100644
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -467,6 +467,16 @@ processed in order by OPERATE."))
 ;;;; General Purpose Utilities
 
 (defmacro while-collecting ((&rest collectors) &body body)
+  "COLLECTORS should be a list of names for collections.  A collector
+defines a function that, when applied to an argument inside BODY, will
+add its argument to the corresponding collection.  Returns multiple values,
+a list for each collection, in order.
+   E.g.,
+\(while-collecting \(foo bar\)
+           \(dolist \(x '\(\(a 1\) \(b 2\) \(c 3\)\)\)
+             \(foo \(first x\)\)
+             \(bar \(second x\)\)\)\)
+Returns two values: \(A B C\) and \(1 2 3\)."
   (let ((vars (mapcar #'(lambda (x) (gensym (symbol-name x))) collectors))
         (initial-values (mapcar (constantly nil) collectors)))
     `(let ,(mapcar #'list vars initial-values)
-- 
GitLab