The lambda template, palette, and menu item each
enclose the current expression with a new application of the
<lambda> constructor. The enclosed expression becomes
the body of the expression.
An additional template is provided
to create <lambda> elements with additional qualifiers.
The bound variables can be created by starting with
the lambda2 named template.
The <lambda> element accepts from one to two arguments.
The one argument version is presented as a lambda expression with
no bound variables. The two argument version presents the lambda
expression with its second argument as a list of bound variables,
enclosed in parentheses.
Special input conventions are needed to enter the bound variables
to the lambda expression. These conventions are borrowed from those
used to create and remove elements of other nary operators.
The usual operations on nary operators can be used to insert
or remove arguments of the <lambda> element. Creating
the first argument follows the usual conventions for
nary operators, but the second argument, containing the list
of bound variables, requires special treatment.
When entering the list of bound variables, the list of variables
can be viewed as its own element containing a list of arguments.
So at this level of the expression,
the usual operations on nary operators can be used to insert and
remove additional bound variables.
In the content MathML generated by the <lambda> element,
the second argument produces <bvar> qualifier elements
for each of bound variable. These elements are generated
as needed by the means used to create the <lambda> element.