anchor.diff:                   (if ,foo ,foo (match ,rest))))))
   
   (def-match-clause switch (forms rest end)
  -   (if end
  -       `(match ,forms)
  -       (with-gensyms (foo)
  -          `(let ((,foo (match ,(append forms rest))))
  -                 (if ,foo ,foo (match ,rest))))))
  +   (print `(switch ,forms ,rest ,(append (car forms) rest)))
  +   (if (not (cdr forms))
  +      `(match ,(car forms))
  +       (if end
  +           (with-gensyms (foo)
  +             `(let ((,foo (match ,(first forms))))
  +                    (if ,foo ,foo (match ((switch ,@(cdr forms)))))))
  +           (with-gensyms (foo)
  +             `(let ((,foo (match ,(append (car forms) rest))))
  +                    (if ,foo ,foo (match ,(append `((switch ,@(cdr forms))) rest))))))))
   
   (def-match-clause single (var rest end)
      (if end
  
positive.code: ;;   recursive expansion of clauses
  ;;   generate the full form, inside a let
  (defmacro destructuring-match (exp style match-form &rest body)
     (let ((match-form (macroexpand `(match ,match-form)))
           (bindings (parse-out-free-symbols match-form)))
           (setf matching-style style)       
           `(let ,(append `((list ,exp)) (simple-pair bindings nil))
              (if ,match-form
                  ,@body 
  
negative.code: (proclaim '(optimize (speed 3) (safety 0) (debug 0) (space 0)))
  ;(declaim #+sbcl(sb-ext:muffle-conditions style-warning))
  ;(declaim #+sbcl(sb-ext:muffle-conditions warning))
  (setf *print-case* :downcase)
  ;; (ql:quickload '(alexandria iterate anaphora) :silent t)
  
  (defpackage destr-match
    (:use cl alexandria iterate anaphora)
    (:shadow switch))
  (in-package destr-match)
  
  ;; TODO
  ;;   [ ] finish off matching clauses
  ;;   [ ] make the actual macro nicer
  ;;   [ ] add neat switch macro
  ;;   [ ] fill out the README with examples and documentation
  ;;   [ ] figure out some way to condense all that repeated bind code
  
  (defparameter destr-match-clauses (make-hash-table :test #'equalp))
  (defparameter matching-style 'symbol) ;; symbol, string, case-sensitive, regex, symbol-regex
  