anchor.diff:      net))
   
   (defmethod output-layer-error ((net t-net) (outputs vector))
  -  (loop for neuron across (neuron-array (output-layer net))
  -     for neuron-index from 0 below (length outputs)
  -     summing (let* ((err (- (aref outputs neuron-index) (output neuron)))
  -               (setf (err neuron) (* 1/2 (expt err 2))))))
  +  (let ((e-total (loop for neuron across (neuron-array (output-layer net))
  +                    for neuron-index from 0 below (length outputs)
  +                    for target-output = (aref outputs neuron-index)
  +                    summing
  +                      (* 1/2 (expt (- target-output (output neuron)) 2)))))
  +    (loop for neuron across (neuron-array (output-layer net))
  +       do (setf (err neuron) e-total))
  +    e-total))
   
   (defmethod learn-vector ((inputs vector) (outputs vector) (net t-net))
     (feed net inputs)
  
positive.code: (defun tset-list-to-tset-vectors (tset)
    "Converts something like 
       '((0 0) (1) (0 1) (0) (1 0) (0) (1 1) (1))
     into something like
       #((#(0 0) #(1)) (#(0 1) #(0)) (#(1 0) #(0)) (#(1 1) #(1)))"
    (map 'vector 'identity
         (loop for i from 0 below (length tset) by 2 collect
  
negative.code:     (feed net (map 'vector 'identity inputs)))
    (:method ((net t-net) (inputs vector))
      ;; Copy input values to input layer
      (loop for input across inputs
         for neuron across (neuron-array (input-layer net))
         do (setf (input neuron) input))
      ;; Feed forward
      (fire net)
      ;; Return a vector with the output value of each output-layer neuron
  