As noted in a prior section, any lisp expression that is enclosed in brackets is a function call. When such an expression is evaluated, the lisp interpreter looks at the very first expression inside the brackets and verifies that it is the name of an already defined function. An error is signalled if it is not. After this error checking is out of the way, the remaining expressions inside the brackets are evaluated one at a time from left to right and a series of values are obtained for these expressions. Once all such expressions are evaluated, the function call is made with these values as the arguments. A few examples are a good idea. Consider the following expression:
(+ 1 2)
When this expression is evaluated, the lisp interpreter first identifies as an expression of Type (3), and proceeds to check if +, the first expression inside the brackets, is the name of a predefined function. In this case, it is. Then it sees two expressions 1, and 2 inside the brackets, and it proceeds to evaluate them both and obtain their values, and subsequently calls the function + with the values 1, and 2. The return value of the function is the value of the expression as a whole.
Consider the following expression:
(+ (+ 1 1) foo)
This is a slight variation on the previous one. The lisp interpreter identifies + as a defined function and then finds another Type (3) expression (+ 1 1). The above process is repeated till its value is obtained. Now the lisp interpreter sees the identifier foo, and evaluates it to obtain the value of the variable. Finally it can call the + function with values 2 and value of foo. The return value of the function is the value of the expression as a whole.
The moral of the story about function calls is simple: if an expression of Type (3) is evaluated, the first expression inside the brackets is a function and the rest are its arguments. The argument expressions are all evaluated to values in turn before the function is called.