apply (AutoLISP)

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

Supported Platforms: Windows and Mac OS

Signature

(apply 'function list)
'function

Type: Symbol

A function.

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

list

Type: List or nil

A list.

If the function accepts no arguments, the value can be nil.

Return Values

Type: String, Integer, Real, List, T, or nil

The result of the function call.

Examples

(apply '+ '(1 2 3))
6

(apply 'strcat '("a" "b" "c"))
"abc"