anchor.diff:                      (progn ,@(reverse alts))))))
           ((:sum :collect :append :count :minimize :maximize)
            (accumulate term (eat state) (eat state :if :into) state))
  +        (:map (let ((key (eat state)))
  +                (multiple-value-bind (val valp)
  +                    (eat state :if :to)
  +                  (unless valp
  +                    (error "MAP must be followed by a TO to specify value."))
  +                  (accumulate :map (list key val) (eat state :if :into) state))))
           (:do (eat state :progn))
           (:return `(return-from ,(name state) ,(eat state)))
           (otherwise (err "a PS-LOOP keyword" term))))
  
positive.code:   (let ((initial (loop-case kind
                         ((:sum :count) 0)
                         ((:maximize :minimize) nil)
                         ((:collect :append) '(array)))))
      (prevar var initial state))
    (loop-case kind
          (:sum `(incf ,var ,term))
          (:count `(unless (null ,term) (incf ,var)))
          (:minimize `(setf ,var (if (null ,var) ,term (min ,var ,term))))
          (:maximize `(setf ,var (if (null ,var) ,term (max ,var ,term))))
          (:collect `((@ ,var :push) ,term))
          (:append `(setf ,var (append ,var ,term)))))
  
  (defun repeat-clause (state)
    (let ((index (ps-gensym)))
  
negative.code:           (prevar var expr state)
            (prebind bindings expr state)))))
  
  (defun accumulate (kind item var state)
    (when (null var)
      (when (and (default-accum-kind state) (not (eq kind (default-accum-kind state))))
        (error "PS-LOOP encountered illegal ~a: ~a was already declared, and there can only be one kind of default accumulation per loop." kind (default-accum-kind state)))
  