apply
 
 
 

Passes a list of arguments to, and executes, a specified function

(apply 'function
list)

Arguments

'function

A function. The function argument can be either a symbol identifying a defun, or a lambda expression.

list

A list. Can be nil, if the function accepts no arguments.

Return Values

The result of the function call.

Examples

Command: (apply '+ '(1 2 3))

6

Command: (apply 'strcat '("a" "b" "c"))

"abc"