OperatorHandlers HANDLERΒΆ
fmt.spad line 322 [edit on github]
HANDLER: Type
OperatorHandlers is an auxiliary domain. It is used holds functions for each operator of OutputForm
, classified by the arity and the name of that operator.
- handler: (%, Integer, String) -> HANDLER
handler(x, n, op)
is only valid ifknownHandler?(n, op)
istrue
. It returns the respective handler stored inx
.
- knownHandler?: (%, Integer, String) -> Boolean
knownHandler?(x, n, op)
checks whether a handler for operatorop
is known. The numbern
denotes the number of arguments that the operator can take. It is OK if bothknownOperator?(m, op)
andknownOperator?(n, op)
returntrue
for differentm
andn
.
- new: () -> %
new()
creates an empty structure of handlers.