[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New issue: STEP-ENVIRONMENT



For Current Practice or an Implementation Note, this is the definition
of TIME in Lucid Common Lisp:

(defmacro time (form)
  `(time-internal #'(lambda () ,form)))


The function TIME-INTERNAL looks something like:

(defun time-internal (thunk)
  (let ((before-time (get-time-state)))
    (unwind-protect
        (funcall thunk)
      (print-time-information before-time (get-time-state)))))

The definition of STEP is similar.  This is just to show that it is
easy to get the right lexical environment even though TIME and STEP
are macros.