Optional parameters: Difference between revisions
Content added Content deleted
Line 173: | Line 173: | ||
=={{header|Common Lisp}}== |
=={{header|Common Lisp}}== |
||
Common Lisp has both named and positional parameters. |
Common Lisp has both named and positional parameters. The following example shows optional named parameters, using the <code>&key</code> keyword. Optional positional parameters are specified using the <code>&optional</code> keyword. |
||
<lang lisp>(defun sort-table (table &key (ordering #'string<) |
<lang lisp>(defun sort-table (table &key (ordering #'string<) |