I\'m trying to create a function on the fly that would return one constant value.
In JavaScript and other modern imperative languages I would use closures:
Stupid idea: how about:
(defun foo (x) `(lambda () ,x)) (funcall (foo 10)) ;; => 10