Next: , Previous: , Up: srfi case-lambda   [Index]

2.10.3 Rationale

case-lambda reduces the clutter of procedures that execute different code depending on the number of arguments they were passed; it is a pattern–matching mechanism that matches on the number of arguments. case-lambda is available in some Scheme systems.

While case-lambda can be implemented as a macro using only facilities available in R5RS Scheme, it admits considerable implementation–specific optimization.