Title CHECK-LAMBDA and COND-LAMBDA Author Joo ChurlSoo Abstract This SRFI introduces CHECK-LAMBDA and CHECK-LAMBDA*, each of which creates a procedure that takes optional arguments and checks the states of actual arguments, and another two macros, COND-LAMBDA and COND-LAMBDA* that return different procedures according to the states of actual arguments as well as the number of them. Rationale The CHECK-LAMBDA reduces not only the clutter of various error conditionals by checking actual arguments but also somewhat lengthy code by combining optional argument handling methods such as LET-OPTIONALS and LET-KEYWORDS into a single syntax. The optional parameters include not only positional fixed parameters but also non-fixed named parameters using simple symbols as keywords without introducing a new data type such as keyword object. The COND-LAMBDA can reduce the clutter of procedures more precisely than CASE-LAMBDA of SRFI-16 by adding tests for the states of actual arguments to its formal argument list. The CHECK-LAMBDA* and COND-LAMBDA* are LET* equivalents corresponding to CHECK-LAMBDA and COND-LAMBDA. Specification The syntax is defined in the extended BNF of R5RS. (check-lambda ) (check-lambda* ) --> | (* * *) | (* * *