anchor.diff:    (declare (ignore temporal-statements))
     (error "'Repeat' can only be used inside a tlambda*"))
   
  -(add-time-predicate and (&rest forms) (values `(and ,@forms) nil 'and))
  -(add-time-predicate or (&rest forms) (values `(or ,@forms) nil 'or))
  -
  -(add-time-predicate once () 
  -  (let ((runsym (gensym "run")))
  -    (values `(unless ,runsym (setf ,runsym t))
  -            `((,runsym nil)) ;;maybe move to last
  -            runsym
  -            nil)))
  -
  -(add-time-predicate before (deadline &key progress) 
  +(add-time-syntax and (&rest forms) nil (list `(and ,@forms) 'and))
  +(add-time-syntax or (&rest forms) nil (list `(or ,@forms) 'or))
  +
  +(add-time-syntax once () nil
  +  (let ((runsym (gensym "run")))    
  +    (list `(unless ,runsym (setf ,runsym t))
  +          runsym
  +          nil
  +          `((,runsym nil)))))
  +
  +(add-time-syntax before (deadline &key progress override) t
     (unless (symbolp progress) (error "'progress' in 'each' must be a symbol"))
     (let ((deadsym (gensym "deadline"))
           (ctimesym (gensym "current-time"))
           (stimesym (gensym "start-time")))
  -    (values (if progress
  -                `(let ((,deadsym ,deadline)
  -                       (,ctimesym (funcall *default-time-source*)))
  -                   (setf ,progress (float (- 1.0 (/ (- ,deadsym ,ctimesym) 
  -                                                    (- ,deadsym ,stimesym)))))
  -                   (beforep ,deadsym))
  -                `(beforep ,deadline))
  -            (when progress `((,stimesym (funcall *default-time-source*))))
  -            `(afterp ,deadline)
  -            (when progress `((,progress 0.0))))))
  -
  -(add-time-predicate after (deadline) `(afterp ,deadline))
  -
  -(add-time-predicate between (start-time end-time &key progress)
  +    (list
  +     (if progress
  +              `(let ((,deadsym ,deadline)
  +                     (,ctimesym (funcall *default-time-source*)))
  +                 (setf ,progress (float (- 1.0 (/ (- ,deadsym ,ctimesym) 
  +                                                  (- ,deadsym ,stimesym)))))
  +                 (beforep ,deadsym))
  +              `(beforep ,deadline))
  +     `(afterp ,deadline)
  +     (when progress `((,progress 0.0)))
  +     (when progress `((,stimesym (funcall *default-time-source*)))))))
  +
  +(add-time-syntax after (deadline &key override) t `(afterp ,deadline))
  +
  +(add-time-syntax between (start-time end-time &key progress override) t
     (let ((deadsym (gensym "deadline"))
           (ctimesym (gensym "current-time")))    
  -    (values (if progress
  -                `(let ((,deadsym ,end-time)
  -                       (,ctimesym (funcall *default-time-source*)))
  -                   (setf ,progress (float (- 1.0 (/ (- ,deadsym ,ctimesym)
  -                                                    (- ,deadsym ,start-time)))))
  -                   (betweenp ,start-time ,end-time))
  -                `(betweenp ,start-time ,end-time))
  -            nil
  -            `(afterp ,end-time)
  -            (when progress `((,progress 0.0))))))
  -
  -(add-time-predicate from-now (offset)
  +    (list (if progress
  +              `(let ((,deadsym ,end-time)
  +                     (,ctimesym (funcall *default-time-source*)))
  +                 (setf ,progress (float (- 1.0 (/ (- ,deadsym ,ctimesym)
  +                                                  (- ,deadsym ,start-time)))))
  +                 (betweenp ,start-time ,end-time))
  +              `(betweenp ,start-time ,end-time))
  +          `(afterp ,end-time)
  +          (when progress `((,progress 0.0))))))
  +
  +(add-time-syntax from-now (offset) nil
     (let ((offsetv (gensym "offset")))
  -    (values offsetv `((,offsetv (from-now ,offset))))))
  -
  -(add-time-predicate the-next (quantity)
  -  (let ((offsetv (gensym "offset")))
  -    (values `(beforep ,offsetv) `((,offsetv (from-now ,quantity))))))
  -
  -(add-time-predicate each (timestep &key step-var fill-var)
  +    (list offsetv nil `((,offsetv (from-now ,offset))))))
  +
  +;; (add-time-syntax the-next (quantity &key override) nil
  +;;   (let ((offsetv (gensym "offset")))
  +;;     (list `(beforep ,offsetv) `((,offsetv (from-now ,quantity))))))
  +
  +(add-time-syntax each (timestep &key step-var fill-var) nil
     (unless (symbolp step-var) (error "step-var in 'each' must be a symbol"))
     (unless (symbolp fill-var) (error "fill-var in 'each' must be a symbol"))
     (let ((stepv (gensym "stepper")))
  -    (values (if fill-var 
  -                `(setf ,fill-var (funcall ,stepv))
  -                `(funcall ,stepv)) 
  -            `((,stepv (make-stepper ,timestep)))
  -            nil
  -            `(,(when step-var `(,step-var ,timestep))
  -               ,(when fill-var `(,fill-var ,stepv))))))
  +    (list (if fill-var 
  +              `(setf ,fill-var (funcall ,stepv))
  +              `(funcall ,stepv))
  +          nil
  +          `(,(when step-var `(,step-var ,timestep))
  +             ,(when fill-var `(,fill-var ,stepv)))
  +          `((,stepv (make-stepper ,timestep))))))
   
   ;;----------------------------------------------------------------------
   ;; Time units
  
positive.code:                                     (cdr (assoc (first expression) defined)))
                                   (error "invalid time expression")))
              :append `((defun ,type (quantity) (floor (* quantity ,count)))
                        (add-time-predicate ,type (quantity) 
                          (list ',type quantity)))
              :do (push (cons type count) defined)))))
  
  
negative.code:           nil
            (remove nil (mapcan #'fifth processed-forms)))))
  
  (defun %process-tprogn-forms (forms)
    (loop :for form :in forms :collect
       (if (atom form) (list form t)
           (case (first form)
             (repeat (trepeat (rest form)))
             (then (tthen (rest form)))
             (progn (tprogn (rest form)))
             (otherwise (if (or (atom (first form))
                                (eq (caar form) 'lambda))
                            (list form t)
                            (cons (second form)
                                  (%compile-time-syntax (first form)))))))))
  
  (defun tthen (forms)
    (unless (null forms)
      (let* ((processed-forms (%process-tprogn-forms forms))
             (counter-sym (gensym "counter"))
             (%closed-vars (remove nil (mapcan #'fifth (copy-tree processed-forms))))
             (let-forms (remove nil (mapcar #'fourth processed-forms)))
             (chain-forms 
              (loop :for (body test expired-test inner-let closed-vars overridep)
                 :in processed-forms :for index :from 0
                 :do (print index)
                 :collect 
                 (list expired-test
                       test
                       body
                       ;;when (< index (1- (length forms))) {TODO} why?
                       (cons `(incf ,counter-sym)
                             (loop :for i :in (fifth (nth (+ index 1) processed-forms))
                                :collect `(setf ,(first i) (second i)
                                                ,@(when overridep 
                                                        `((:override ,expired-test))))))))))
        (list `(let ,(when let-forms (list let-forms))
                 ,(t-chain-expand counter-sym (print chain-forms)))
              `(< ,counter-sym ,(length forms))
              `(= ,counter-sym ,(length forms))
              nil
              (cons `(,counter-sym 0)
                    (cons (first %closed-vars) 
                          (mapcar #'listify (rest %closed-vars))))))))
  
  (defun t-chain-expand (counter forms)
    (loop :for (expire-test run-test code initialize-next) :in (reverse forms)
       :for i :from (1- (length forms)) :downto 0 :with accum = nil :do
       (setf accum `(if ,expire-test
                        (progn (when (= ,counter ,i) ,@initialize-next) ,accum)
                        (when ,run-test ,code)))
       :finally (return accum)))
  
  (defun trepeat (forms) 
    (let* ((processed-forms (%process-tprogn-forms forms))
           (counter-sym (gensym "counter"))
           (%closed-vars (remove nil (mapcan #'fifth (copy-tree processed-forms))))
           (let-forms (remove nil (mapcar #'third (copy-list processed-forms))))
           (chain-forms 
            (loop :for (body test expired-test) :in processed-forms
               :for index :from 0 :collect 
               (list expired-test test body
                     (if (= index (1- (length forms)))
                         (cons `(setf ,counter-sym 0)
                               (loop :for i :in (fifth (first processed-forms)) :collect `(setf ,@i)))
                         (cons `(incf ,counter-sym)
                               (loop :for i :in (fifth (nth (+ index 1) processed-forms)) :collect `(setf ,@i))))))))
      (list `(let ,(when let-forms (list let-forms))
               ,(t-chain-expand counter-sym chain-forms))
            t
  