RosettaCodeData/Task/Runtime-evaluation-In-an-en.../Common-Lisp/runtime-evaluation-in-an-en...

6 lines
164 B
Common Lisp

(defun eval-with-x (program a b)
(let* ((f (compile nil `(lambda (x) ,program)))
(at-a (funcall f a))
(at-b (funcall f b)))
(- at-b at-a)))