Go to the previous, next section.
(operator operand ...)
A procedure call is written by simply enclosing in parentheses expressions for the procedure to be called (the operator) and the arguments to be passed to it (the operands). The operator and operand expressions are evaluated and the resulting procedure is passed the resulting arguments. See section Lambda Expressions, for a more complete description of this.
Another name for the procedure call expression is combination. This word is more specific in that it always refers to the expression; "procedure call" sometimes refers to the process of calling a procedure.
Unlike some other dialects of Lisp, Scheme always evaluates the operator expression and the operand expressions with the same evaluation rules, and the order of evaluation is unspecified.
(+ 3 4) => 7 ((if #f = *) 3 4) => 12
A number of procedures are available as the values of variables in the
initial environment; for example, the addition and multiplication
procedures in the above examples are the values of the variables
+
and *
. New procedures are created by evaluating
lambda
expressions.
If the operator is a syntactic keyword, then the expression is not
treated as a procedure call: it is a special form. Thus you should not
use syntactic keywords as procedure names. If you were to bind one of
these keywords to a procedure, you would have to use apply
to
call the procedure. MIT Scheme signals an error when such a
binding is attempted.
Go to the previous, next section.