morph
|
The morph function performs normal Analytic Information Server macro substitution on
the input argument, {input}. The input argument {input} may be any Lisp form
or forms enclosed in a list. Normally the morph function receives the output of the
lisp function. The output of the morph function is a Lisp form, which is
the input argument after it has been transformed by macro substitution. Normally the
output of morph is input to the compile function, since the morph and
lisp functions are called automatically when entering Analytic Information Server expressions.
The second argument {altRule}, called the alternative rule function, is optional. If the
{altRule} function is specified, this function will perform the macro substitution in place of
Normal Analytic Information Server macro substitution rules. The {altRule} function must be a function
of one argument. The morph function will repeatedly send the {altRule} function every
sub-list within the original input. If the {altRule} function wishes to pass a sub-list without
macro substitution, it should return the Boolean value false. If the {altRule} function wishes to
perform macro substitution on a sub-list, it should return the Lisp form to be substituted in place of the sub list.
Usage The morph function is used to perform macro substitution. Since morph
supports alternative rule functions, the substitution can be as complex as desired
by the Lisp programmer.
(morph input altRule altFailure) A Lisp form containing any macro substitutions.
Expression:
Arguments
Name
Type
Description Argument: input List
A Lisp form represented as a list. Argument: altRule ---
Optional function argument. If present, it must have a single argument, and it
will replace the normal Analytic Information Server macro substitution rules.
It must return the lisp form to be substituted, or pass a value Argument: altFailure ---
Optional argument. The altFailure is the value to be recognized by morph that the
substitution will not take place. If the altRule function returns the altFailure
value, the morph function will not substitute. If the altRule function returns a
value other than the altFailure value, morph will perform the substitution.
If the altFailure argument is not present, morph will assume that the failure value
is the Boolean value false.
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
Pair | List | Boolean |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|