We have two ways to define a function: defun and lambda, and we can use setf for labeling a lambda function.
(defun g (x) (* x x))
(setf f (lambda (x) (+ x x)))
The function can be the first element in a list.
(g 3)
9
Or it can be a parameter to the other function.
(mapcar #'g '(1 2 3))
(1 4 9)
However with lambda, the usage is different.
(funcall f 3)
6
(mapcar f '(1 2 3))
(2 4 6)
I'm curious what's the logic behind the differences?
It's even more confusing compared with scheme's rather consistent use cases.
> (define (g x) (+ x x))
> (g 3)
6
> (map g '(1 3 4))
(2 6 8)
> (define f (lambda (x) (* x x)))
> (f 2)
4
> (map f '(1 2 3))
(1 4 9)