anchor.diff:  ;;   recursive expansion of clauses
   ;;   generate the full form, inside a let
   (defmacro destructuring-match (exp style match-form &rest body)
  +   (setf matching-style style)
      (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 
  
positive.code: 
  (def-match-clause test (var rest end)
     (if end
         `(when (and list (funcall ,(second var) list)) (setf ,(first var) list) t)
         (with-gensyms (v x w r loop succeed fail end)
           `(let ((,v (list (car list))) (,x (cdr list)) (,w nil) (,r nil))
                  (tagbody
                    ,loop
                       (when (not ,x) (go ,fail))
                       (setf ,w (let ((list ,x)) (match ,(cdr exp))))
                       (when (and (eq ,w t) (funcall ,(second var) ,w)) (go ,succeed))
                       (appendf ,v (list (car ,x)))
                       (setf ,x (cdr ,x))
                       (go ,loop)
                    ,fail
                       (setf ,(car exp) nil)
                       (setf ,r nil)
                       (go ,end)
                    ,succeed
                       (setf ,(car exp) ,v)
                       (setf ,r ,w)
                    ,end)
                  ,r))))
  
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
  