--- a/losh.lisp Tue Feb 07 12:26:15 2017 +0000
+++ b/losh.lisp Thu Feb 09 13:19:30 2017 +0000
@@ -1459,26 +1459,26 @@
(defmacro-clause (COLLECT-HASH key-and-value &optional
INTO var
- TEST (test #'eql))
+ TEST (test '#'eql))
"Collect keys and values into a hash table at `var`.
- `key-and-value` should be a `(key-expr . value-expr)` pair.
-
If `var` is omitted the hash table will be returned instead.
+ `key-and-value` should be a list of `(key-expr value-expr)`.
+
`test` specifies the test used for the hash table.
Example:
(iterate (for x :from 0)
(for y :in '(a b c))
- (collect-hash ((1+ x) . y)))
+ (collect-hash ((1+ x) y)))
; => {1 a
; 2 b
; 3 c}
"
- (destructuring-bind (key . value) key-and-value
+ (destructuring-bind (key value) key-and-value
(let ((hash-table (or var iterate::*result-var*)))
`(progn
(with ,hash-table = (make-hash-table :test ,test))