Common Lisp Package: NEW-LET

README:

FUNCTION

Private

ANALYZE-DECLS (CLAUSES BODY)

Returns two values. The first value is a cons of: (a) for the bound declarations at the head of `body', an alist from variable name to a list of declarations affecting that variable; (b) a list of the remaining (free) declarations. The second value is `body' with the declarations stripped off.

Undocumented

BCOND-BUILD-CLAUSE (LET-SYM LET-CLAUSES PRED CONSEQUENTS BLOCK-NM)

BCOND-CLAUSE (CLAUSE BLOCK-NM)

BOUND-DECLS (DECLS VARS)

EXPAND-NEW-LET (CLAUSES BODY DECLS)

NEW-LET-BOUND-VARS (CLAUSES)

PRUNE-DECLS (DECLS VARS)

SPLIT-LEVEL (CLAUSES THIS-LEVEL-SINGLE THIS-LEVEL-MULTIPLE NEXT-LEVEL)

TYPE-SPECIFIER-NAME? (X)

MACRO

Public

BCOND (&REST CLAUSES)

A generalization of CL:COND that makes it convenient to compute a value in the predicate expression of a clause and then use that value in the consequent. If the predicate expression is a LET form, then the scope of the variables bound by the LET is extended to include the consequent expressions. For example: (cond ((let ((x (foo))) (bar x)) (baz x))) Here the X in (BAZ X) is the one bound to the result of (FOO).

COND (&REST CLAUSES)

A generalization of CL:COND that makes it convenient to compute a value in the predicate expression of a clause and then use that value in the consequent. If the predicate expression is a LET form, then the scope of the variables bound by the LET is extended to include the consequent expressions. For example: (cond ((let ((x (foo))) (bar x)) (baz x))) Here the X in (BAZ X) is the one bound to the result of (FOO).

FN (LAMBDA-LIST &BODY BODY)

A variant of the `lambda' with two features: (a) the name is shorter and (b) it automatically generates an `ignore' declaration for any parameter whose name begins with an underscore. Note that #'(fn ...) doesn't work, since CL doesn't have Zetalisp-style lambda macros; you have to say just (fn ...) This is the modern style anyway, I think.

LET (CLAUSES &BODY BODY)

A generalization of CL:LET that better supports nested bindings and multiple values. Syntax: (let (<clause>*) <body>). The <clause> syntax is more general than for CL:LET: <clause> ::= <symbol> ; binds to NIL | ( <symbol> ) ; likewise | <clause1> <clause1> ::= ( <symbol>+ <form> ) ; binding | ( <clause1>+ ) ; nesting When a clause begins with more than one variable name, they are to be bound to successive values of the form. The nesting of clauses indicates sequencing of bindings; more deeply nested clauses may reference bindings of shallower clauses. All bindings at a given depth are done in parallel. This allows arbitrary combinations of parallel and sequential binding. Standard declarations at the head of BODY are handled correctly, though nonstandard ones may not be. If two variables of the same name are bound at different levels, any declaration applies to the inner one.

NLET (CLAUSES &BODY BODY)

A generalization of CL:LET that better supports nested bindings and multiple values. Syntax: (let (<clause>*) <body>). The <clause> syntax is more general than for CL:LET: <clause> ::= <symbol> ; binds to NIL | ( <symbol> ) ; likewise | <clause1> <clause1> ::= ( <symbol>+ <form> ) ; binding | ( <clause1>+ ) ; nesting When a clause begins with more than one variable name, they are to be bound to successive values of the form. The nesting of clauses indicates sequencing of bindings; more deeply nested clauses may reference bindings of shallower clauses. All bindings at a given depth are done in parallel. This allows arbitrary combinations of parallel and sequential binding. Standard declarations at the head of BODY are handled correctly, though nonstandard ones may not be. If two variables of the same name are bound at different levels, any declaration applies to the inner one.