The Common Lisp HyperSpec says in the funcall
entry that
(funcall function arg1 arg2 ...)
== (apply function arg1 arg2 ... nil)
== (app
apply
is useful when the argument list is known only at runtime, especially when the arguments are read dynamically as a list. You can still use funcall
here but you have to unpack the individual arguments from the list, which is inconvenient. You can also use apply
like funcall
by passing in the individual arguments. The only thing it requires is that the last argument must be a list:
> (funcall #'+ 1 2)
3
> (apply #'+ 1 2 ())
3