Permalink
Browse files

UTILS: A bit more cleanup to list matching

  • Loading branch information...
1 parent 8f49486 commit 68ebf88ef236817e5d64042e72d9bd6cede7b21d @adlai committed Dec 25, 2009
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/utils.lisp
View
@@ -37,10 +37,8 @@
(defmacro acond2 (&rest clauses)
(when clauses
(with-gensyms (val foundp)
- (destructuring-bind ((test &rest progn) &rest others)
- clauses
- `(multiple-value-bind (,val ,foundp)
- ,test
+ (destructuring-bind ((test &body progn) &rest others) clauses
+ `(multiple-value-bind (,val ,foundp) ,test
(if (or ,val ,foundp)
(let ((it ,val))
(declare (ignorable it))
@@ -78,7 +76,7 @@
(defmacro list-match-case (target &body clauses)
(when clauses
- (destructuring-bind ((test . progn) . others) clauses
+ (destructuring-bind ((test &body progn) &rest others) clauses
(with-gensyms (tgt binds success)
(let ((vars (find-vars test nil)))
`(let ((,tgt ,target)) ; (once-only (target) ..)

0 comments on commit 68ebf88

Please sign in to comment.