Solve it as follows:
e.g1
(defun create-function(a1)
(defun plus-function(x) (+ x a1)))
(create-function 2) -> PLUS-FUNCTION
(plus-function 3) ->5
e.g2
(setf (symbol-function 'printx) #'(lambda (x) (print x)))
(printx '(1 2 3)) -> (1 2 3)
Previously I also had the same problem when I defined the function.
Example:
(defun test-function(fn)
(defun fn ((lambda() (print "aaa")))))
After I run
(test-function 'aaafunction)
The evaluation result is
FN
It does not return a function named "aaafunction"...
To the person who downvote my answer:
We are newbies of Lisp, but we are working hard to learn knowledge, and you are not so respectful.