From 28bd257494d8a0a6337d6fdd06b820412a2f1c55 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 14 Jan 2014 06:57:43 -0800 Subject: * eval.c (bind_args): Implemented default values for optional arguments. (op_defun): Permit the syntax. * txr.1: Documented. --- txr.1 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index a6760076..888d4cbc 100644 --- a/txr.1 +++ b/txr.1 @@ -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 ( ). +In this situation, if the call does not specify a value for the parameter, +then the parameter takes on the value of the expression . +The expression is evaluated in the environment in which the lambda +was constructed. + Functions created by lambda capture the surrounding variable bindings. -- cgit v1.2.3