The first one doesn’t work.
But the second one works,which make me confused..
Could anyone explain a bit about that?
CL-USER> (funcall (first '(#'+ +)) 1)
; Evaluation aborted on #<TYPE-ERROR expected-type:
; (OR FUNCTION SYMBOL) datum: #'+>.
CL-USER> (funcall #'+ 1)
1
The
#'is a reader macro.#'+is an abbreviation for(function +).'is a reader macro expanding to(quote …). The latter returns its argument unevaluated. So,'(#'+ +)yields((function +) +)(#'+will be turned into(function +)at read-time). Thefirstof this is just the list(function +), which is not a function. Now,(function +)is printed as#'+, which is what you see in the debugger.Using non-literal lists will work: