#

## 3.4.1 Ordinary Lambda Lists

An ordinary lambda list is used to describe how a set of arguments is received by an ordinary function. The defined names in the next figure are those which use ordinary lambda lists:

    define-method-combination  handler-case  restart-case
    defun                      labels
    flet                       lambda

Figure 3-12. Standardized Operators that use Ordinary Lambda Lists

An ordinary lambda list can contain the lambda list keywords shown in the next figure.

    &allow-other-keys  &key       &rest
    &aux               &optional

Figure 3-13. Lambda List Keywords used by Ordinary Lambda Lists

Each element of a lambda list is either a parameter specifier or a lambda list keyword. Implementations are free to provide additional lambda list keywords. For a list of all lambda list keywords used by the implementation, see lambda-list-keywords.

The syntax for ordinary lambda lists is as follows:

    lambda-list::= (var*
                    [&optional {var | (var [init-form [supplied-p-parameter]])}*]
                    [&rest var]
                    [&key {var | ({var | (keyword-name var)} [init-form [supplied-p-parameter]])}* [&allow-other-keys]]
                    [&aux {var | (var [init-form])}*])

A var or supplied-p-parameter must be a symbol that is not the name of a constant variable.

An init-form can be any form. Whenever any init-form is evaluated for any parameter specifier, that form may refer to any parameter variable to the left of the specifier in which the init-form appears, including any supplied-p-parameter variables, and may rely on the fact that no other parameter variable has yet been bound (including its own parameter variable).

A keyword-name can be any symbol, but by convention is normally a keyword[1]; all standardized functions follow that convention.

An ordinary lambda list has five parts, any or all of which may be empty. For information about the treatment of argument mismatches, see Section 3.5 (Error Checking in Function Calls).

## 3.4.1.1 Specifiers for the required parameters

## 3.4.1.2 Specifiers for optional parameters

## 3.4.1.3 A specifier for a rest parameter

## 3.4.1.4 Specifiers for keyword parameters

## 3.4.1.5 Specifiers for &aux variables

## 3.4.1.6 Examples of Ordinary Lambda Lists

Copyright 1996-2001, Xanalys Inc. All rights reserved.