diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-14 06:57:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-14 06:57:43 -0800 |
commit | 28bd257494d8a0a6337d6fdd06b820412a2f1c55 (patch) | |
tree | a7db5acbae930222af2fad3b6df20461725666d8 /txr.1 | |
parent | 48c8cec1c83d70e23dc1359b85cfd9e36fdaa60f (diff) | |
download | txr-28bd257494d8a0a6337d6fdd06b820412a2f1c55.tar.gz txr-28bd257494d8a0a6337d6fdd06b820412a2f1c55.tar.bz2 txr-28bd257494d8a0a6337d6fdd06b820412a2f1c55.zip |
* eval.c (bind_args): Implemented default values for optional
arguments.
(op_defun): Permit the syntax.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5821,6 +5821,12 @@ but a separator between required parameters and optional parameters. When the function is called, optional parameter for which arguments are not supplied take on the value nil. +An optional parameter can also be written in the form (<name> <expr>). +In this situation, if the call does not specify a value for the parameter, +then the parameter takes on the value of the expression <expr>. +The expression is evaluated in the environment in which the lambda +was constructed. + Functions created by lambda capture the surrounding variable bindings. |