funcall

funcall — provides compatibility with other Lisp dialects.

Syntax

funcall (function, args)

		

Arguments

function

A function definition.

args

The arguments to the function.

Returns

The result of the function.

Description

This is provided for compatibility with some other dialects of Lisp. Gamma's version of Lisp, SCADALisp, does not need this function as function definitions can be bound directly to any symbol and called by naming that symbol.

Occasionally this function can use useful in Gamma if a large number of variable arguments are being passed to a function. The called function is named as the first argument and the list of arguments to pass to it are passed as a list in the second arg.

Example

Gamma> funcall(atan2, list(5,3));
1.0303768265243125057
Gamma> function plus6 (a,b,c,d,e,f) a+b+c+d+e+f;
(defun plus6 (a b c d e f) (+ (+ (+ (+ (+ a b) c) d) e) f))
Gamma> funcall(plus6, list(1,2,3,4,5,6));
21
Gamma> 
		

See Also

defun, function