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.


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)

Arguments Name Type Description
Argument:inputList 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.


A Lisp form containing any macro substitutions.



Here are a number of links to Lambda coding examples which contain this instruction in various use cases.


Argument Types

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.

abortTransaction addMethod append apply
associate badd bcompareEQ bcompareGE
bcompareGT bcompareLE bcompareLT bcompareNE
bdiv beginTransaction binaryInsert binaryNand
binaryNor binaryNot binaryNxor binarySearch
bitwiseAnd bitwiseNand bitwiseNor bitwiseNot
bitwiseNxor bitwiseOr bitwiseShiftLeft bitwiseShiftRight
bitwiseXor bmod bmul boolean
c::r car ccompareEQ ccompareGE
ccompareGT ccompareLE ccompareLT ccompareNE
cdr character checkPointTransaction clear
commitTransaction compareEQ compareGE compareGT
compareLE compareLT compareNE compare
comparison compile cons copy
count debug delete dimension
disassemble display eval exportCsv
exportSbf exportTab fdisplay fileClose
fileCopy fileDir fileDisplay fileErase
fileOpen fileRead fileWrite filewriteln
findBlock gc icompareEQ icompareGE
icompareGT icompareLE icompareLT icompareNE
importCsv importSbf importTab inside
inspect integer isAtom isBitVector
isBoolean isBound isByteVector isCharAlphabetic
isCharAlphanumeric isCharLowercase isCharName isCharNumeric
isCharUppercase isCharWhitespace isCharacter isComplex
isDate isDirectory isEqual isError
isEven isExact isFloatVector isIdentical
isImmediate isInexact isInside isIntegerVector
isInteger isMatrix isMember isMoney
isNegative isNull isNumberMatrix isNumberVector
isNumber isObjectVector isObject isOdd
isPair isPcodeVector isPositive isTransaction
isType isVector isZero last
length lisp list loadModule
loadWorkspace logConsole macroReplace makeQuotedList
map mapc member money
morph ncompareEQ ncompareGE ncompareGT
ncompareLE ncompareLT ncompareNE new
number objectToList objectToMatrix objectToNumMatrix
objectToNumVector objectToVector offset onError
pair pointer proplist proprecord
putprop quit quote ref
remProp remove rename reset
reverse saveModule saveObject saveWorkspace
setBlock setCar setCdr setLastCdr
set setf setq sizeof
sort stringCiEQ stringCiGE stringCiGT
stringCiLE stringCiLT stringCiNE string
substringCiEQ substringCiGE substringCiGT substringCiLE
substringCiLT substringCiNE substringEQ substringGE
substringGT substringLE substringLT substringNE
systemCheck type vectorFill version
writelg writeln

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE