my elisp program is:
(defun test (f x) (f x))
(test (lambda (x) (* x x)) 10)
run it, an error happened:
* Eval error * Symbol's function definition is void: f
Emacs is a lisp-2, so has a different namespace for functions and variables. So, in test, the f in the second (f x) is not the same as the (f) in the parameter list.
Try
(defun test (f x) (funcall f x))
All is good.
Here's the correction:
(defun test (f x)
(funcall f x))
(test (lambda (x) (* x x)) 10)