(r5rs.info.gz) Procedure calls
Info Catalog
(r5rs.info.gz) Literal expressions
(r5rs.info.gz) Primitive expression types
(r5rs.info.gz) Procedures
4.1.3 Procedure calls
---------------------
-- syntax: <operator> <operand1> ...,
A procedure call is written by simply enclosing in parentheses
expressions for the procedure to be called and the arguments to be
passed to it. The operator and operand expressions are evaluated
(in an unspecified order) and the resulting procedure is passed
the resulting arguments.
(+ 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 (see section Procedures).
Procedure calls may return any number of values (see `values' in section
Control features). With the exception of `values' the
procedures available in the initial environment return one value
or, for procedures such as `apply', pass on the values returned by
a call to one of their arguments.
Procedure calls are also called _combinations_.
_Note:_ In contrast to other dialects of Lisp, the order of
evaluation is unspecified, and the operator expression and
the operand expressions are always evaluated with the same
evaluation rules.
_Note:_ Although the order of evaluation is otherwise
unspecified, the effect of any concurrent evaluation of the
operator and operand expressions is constrained to be
consistent with some sequential order of evaluation. The
order of evaluation may be chosen differently for each
procedure call.
_Note:_ In many dialects of Lisp, the empty combination, (),
is a legitimate expression. In Scheme, combinations must
have at least one subexpression, so () is not a syntactically
valid expression.
Info Catalog
(r5rs.info.gz) Literal expressions
(r5rs.info.gz) Primitive expression types
(r5rs.info.gz) Procedures
automatically generated byinfo2html