XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

12  Evaluation Functions


  1. eval - evaluate an XLISP expression
  2. apply - apply a function to a list of arguments
  3. funcall - call a function with arguments
  4. quote - return an expression unevaluated
  5. function - get the functional interpretation
  6. backquote - fill in a template
  7. lambda - make a function closure
  8. get-lambda-expression - get the lambda expression
  9. macroexpand - recursively expand macro calls
  10. macroexpand-1 - expand a macro call

(eval expr) - evaluate an XLISP expression
expr - the expression to be evaluated
returns the result of evaluating the expression

(apply fun args) - apply a function to a list of arguments
fun - the function to apply [or function symbol]
args - the argument list
returns the result of applying the function to the arguments

(funcall fun arg...) - call a function with arguments
fun - the function to call [or function symbol]
arg - arguments to pass to the function
returns the result of calling the function with the arguments

(quote expr) - return an expression unevaluated
expr - the expression to be quoted [quoted]
returns expr unevaluated

(function expr) - get the functional interpretation
expr - the symbol or lambda expression [quoted]
returns - the functional interpretation

(backquote expr) - fill in a template
expr - the template
returns - a copy of the template with comma and comma-at expressions expanded

(lambda args expr...) - make a function closure
args - formal argument list [lambda list] [quoted]
expr - expressions of the function body
returns - the function closure

(get-lambda-expression closure) - get the lambda expression
closure - the closure
returns - the original lambda expression

(macroexpand form) - recursively expand macro calls
form - the form to expand
returns - the macro expansion

(macroexpand-1 form) - expand a macro call
form - the macro call form
returns - the macro expansion

XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next