anchor.diff:                                        (cons (cons name :stride) (prefix-gensym "STRIDE" name))))))))
       (labels ((var-symbol (name type)
                  (cdr (assoc (cons name type) var-alist :test #'equal)))
  -             (bind-count (name type function)
  -               (list (var-symbol name type)
  -                     (list function name)))
  -             (expand-bind-counts (args body)
  -               (if (null args)
  -                   body
  -                   (destructuring-bind (name type &rest params) (car args)
  -                     (declare (ignore params))
  -                     (let ((data (var-symbol name :data))
  -                           (offset (var-symbol name :offset))
  -                           (stride (var-symbol name :stride))
  -                           (rows (var-symbol name :rows))
  -                           (cols (var-symbol name :cols))
  -                           (inc (var-symbol name :inc))
  -                           (length (var-symbol name :length)))
  -                       (case type
  -                         (:matrix
  -                          `((let (,(bind-count name :rows 'matrix-rows)
  -                                  ,(bind-count name :cols 'matrix-cols)
  -                                   ,(bind-count name :stride 'matrix-stride)
  -                                   ,(bind-count name :offset 'matrix-offset)
  -                                   (,data (matrix-data ,name)))
  -                              (declare (type fixnum ,offset ,stride ,rows ,cols))
  -                              ;; check overflow
  -                              (unless (matrix-counts-in-bounds-p
  -                                       (length ,data) ,offset ,stride ,rows ,cols)
  -                                (matrix-storage-error "Argument ~A is out of bounds" ',name))
  -                              (cffi-sys:with-pointer-to-vector-data (,name ,data)
  -                                ,@(expand-bind-counts (cdr args) body)))))
  -                         (:vector
  -                          (expand-bind-counts
  -                           `((,name :matrix))
  -                           `((let ((,inc (matrix-counts-vector-increment ,rows ,cols ,stride))
  -                                   (,length (* ,rows ,cols)))
  -                               ,@(expand-bind-counts (cdr args) body)))))
  -                         (otherwise
  -                          (expand-bind-counts (cdr args) body)))))))
                (true-arg (name type params)
                  (cond
                    ((eq type :vector)
  
positive.code:          ;; declare types
           ,@(when matrix-args `((declare (type matrix ,@matrix-args))))
           ;; bind counts
           ,@(expand-bind-counts
              args
              `( ;; check sizes
                ,@(loop
                     for (name type . params) in args
                     for length-checks = (loop for param in params
                                            when (and (consp param) (find (first param) '(:length :rows :cols)))
                                            collect (var-symbol (second param) (first param)))
                     when (cdr length-checks)
                     collect `(assert (= ,@length-checks)))
                  ;; make the damn call
                  (,c-name ,@(loop for (name type . params) in args
                                append (true-arg name type params)))))
           ;;output
  
  
  
           ,@(cond
              ((null inout-args) nil)
              ((= 1 (length inout-args)) inout-args)
  
negative.code:             (def-la-wrapper (,c-lisp-name ,lisp-name) ,result-type
                ,@args))))
  
  
  
  ;;;;;;;;;;;;;;;;;;;;
  ;;; LEVEL 1 BLAS ;;;
  ;;;;;;;;;;;;;;;;;;;;
  (def-la ("cblas_dscal" dscal) :void
    (n cblas-size-t (:length x))
    (alpha :double)
    (x :vector :inout))
  
  (def-la ("cblas_daxpy" daxpy) :void
    (n cblas-size-t (:length x) (:length y))
    (alpha :double)
    (x :vector)
    (y :vector))
  
  ;; (def-la ("cblas_daxpy" daxpy) :void
  ;;   (n cblas-size-t (:length x))
  ;;   (alpha :double)
  
  ;;;;;;;;;;;;;;;;;;;;
  ;;; LEVEL 2 BLAS ;;;
  ;;;;;;;;;;;;;;;;;;;;
  
  ;;;;;;;;;;;;;;;;;;;;
  ;;; LEVEL 3 BLAS ;;;
  ;;;;;;;;;;;;;;;;;;;;
  
  
  ;;;;;;;;;;;;;
  ;;; AMINO ;;;
  ;;;;;;;;;;;;;
  
  (def-la ("aa_la_d_angle" d-angle) :double
    (n size-t (:length x) (:length y))
    (x :vector)
    (y :vector))
  
  
  ;; (defcfun "aa_la_d_angle" :double
  