anchor.diff:  
   (defun qp (constraints objectives
              &key
  +             (result-type :alist)
                (default-lower 0d0)
                (default-upper most-positive-double-float))
     (let* ((vars (opt-variables constraints objectives))
  
positive.code:                 factor)))
        ;; munge constraint
        (ecase type
          (<= (values v value))))))
  
  
  (defun qp-objectives (variables objectives)
  
negative.code:     ;; construct constraints
      (dolist (c constraints)
        (multiple-value-bind (row b-elt) (qp-constraint-rows vars c)
          (setq a-rows (append row a-rows)
                b-list (append b-elt b-list))))
      ;; upper/lower
      (multiple-value-bind (lower upper) (opt-bounds vars constraints
                                                     :default-lower default-lower
                                                     :default-upper default-upper)
        (let* ((qp (make-qp :a (apply #'row-matrix a-rows)
                            :b (make-array (length b-list)
                                           :element-type 'double-float
                                           :initial-contents b-list)
                            :c (qp-objectives vars objectives)
                            :d (make-matrix n-var n-var)
                            :l lower
                            :u upper))
               (solution-vector (qp-solve qp)))
          (ecase result-type
            (:alist (loop for v in vars
                       for x across solution-vector
                       collect (cons v x))))))))
  