RosettaCodeData/Task/Runtime-evaluation-In-an-environment/Common-Lisp/runtime-evaluation-in-an-environment-3.lisp
2023-07-01 13:44:08 -04:00

5 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)))