anchor.diff:  ;; to game building.
   
   (in-package :base-time)
  +
  +;; (tdefun test () 
  +;;   (then ((before (from-now 1000)) (print "hi"))
  +;;         ((before (from-now 2000)) (print "there"))))
  +
  +;; (tdefun test () 
  +;;   ((before (from-now 2000)) (print "1"))
  +;;   ((before (from-now 4000)) (print "2")))
   
   ;;{TODO} THIS IS WRONG, FIX THIS 
   ;; -----------------------------------------------------------------------------
  
positive.code:        :code chained
         :run-test `(< ,counter-sym ,(length forms))
         :expired-test (when (not repeat) `(= ,counter-sym ,(length forms)))
         :closed-vars (cons `(,counter-sym 0) closed-vars))))
  
  ;;------------------
  ;; Time conditional
  
negative.code: 
  ;; {TODO} can use func-name for block if tdefun
  (defun gen-time-function-body (name args body)
    (with-t-obj () (tprogn body)
      (let ((lbody `(let ,local-vars
                      ,(if expired-test
                           `(if ,expired-test
                                (cfunc:signal-expired)
                                ,code)
                           code)))
            (first-run-sym (gensym "first-run")))
        `(let* ((,current-time-sym (funcall *default-time-source*))
                (,overflow-sym (funcall *default-time-source*))
                ,@(loop :for (a b) :in closed-vars
                     :collect (list a b))
                (,first-run-sym t))
           (declare (ignorable ,current-time-sym ,overflow-sym))
           (,@(if name `(defun ,name) '(lambda)) ,args     
              (setf ,current-time-sym (funcall *default-time-source*))
              (block tlambda-implicit-block
                (tagbody tlambda-start
                   (return-from tlambda-implicit-block
                     (progn
                       (when ,first-run-sym 
                         (setf ,first-run-sym nil)
                         ,@initialize) 
                       ,lbody)))))))))
  
  (defmacro tdefun (name args &body body) (gen-time-function-body name args body))
  (defmacro tlambda (args &body body) (gen-time-function-body nil args body))
  