www.delorie.com/gnu/docs/elisp-manual-21/elisp_118.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.2.5 Evaluation of Function Forms

If the first element of a list being evaluated is a Lisp function object, byte-code object or primitive function object, then that list is a function call. For example, here is a call to the function +:

 
(+ 1 x)

The first step in evaluating a function call is to evaluate the remaining elements of the list from left to right. The results are the actual argument values, one value for each list element. The next step is to call the function with this list of arguments, effectively using the function apply (see section 12.5 Calling Functions). If the function is written in Lisp, the arguments are used to bind the argument variables of the function (see section 12.2 Lambda Expressions); then the forms in the function body are evaluated in order, and the value of the last body form becomes the value of the function call.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003