(apply function list)


Make list do what func says.


This function performs a function to the list. The first argument, function, is either a pre-defined or user-defined function with a quote (') preceding it. The second argument must be a list. This function is useful when building a list dynamically.

Examples

Code Returns
(apply '/ '(10 5)) 2
(apply '> '(6 7)) nil

Notice that the following are equivalent to the previous examples:

Code Returns
(/ 10 5) 2
(> 6 7) nil

Tell me about...

(defun [c:] name ([arg1 arg2 ...] / [local-var1 local-var2 ...]) expression)

(lambda arguments expression ...)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language