[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New issue: STEP-ENVIRONMENT
- To: Moon@stony-brook.scrc.symbolics.com
- Subject: New issue: STEP-ENVIRONMENT
- From: Eric Benson <edsel!eb@labrea.Stanford.EDU>
- Date: Mon, 14 Mar 88 01:06:06 PST
- Cc: CL-Cleanup@sail.stanford.edu
- In-reply-to: David A. Moon's message of Sat, 12 Mar 88 18:26 EST <19880312232651.2.MOON@EUPHRATES.SCRC.Symbolics.COM>
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.