.he 'OPERATION''PAge %'
.fo 'Steven Hardy''January 78'
OPERATION
.br
---------
.br
In addition to its use after VARS (explained below), this
symbol announces an operator definition to the compiler.
Operations are ordinary functions, but the identifiers holding
them have a special property - they do no need dots or 
parentheses to indicate a function call, so that X + Y is
interpreted as +(X,Y).  (The former is sometimes described as
infix notation, the latter as prefix.)  For example, to define
infix operators to perform arithmetic operations on lists of
numbers we would execute:-
.tp 8
.tp 8
 	: OPERATION ++ X Y;
 	:	IF	X=[]
 	:	OR	Y=[]
 	:	THEN	[]
 	:	ELSE	[%HD(X) + HD(Y)%]::(TL(X) ++ TL(Y))
 	:	CLOSE
 	: END;
.br

.tp 6
 	: [1 2 3] ++ [3 4 5] =>
 	** [4 6 8]
.br
Infix functions have a default predence of 4; If this is inappropriate,
.br
Infix functions have a precedence (the default being 4). If this is
inappropriate a different precedence is specified thus:
 	: OPERATION 3 ** x y;
 	: ...
 	: END;
.br
Operation identifiers can be any word valid as normal variable, but once
declared anywhere as an operation an identifier must always be an operation
(unless CANCELled).  
 	: OPERATION N FRED......END;
.br
is equivalent to
 	: VARS OPERATION N FRED: LAMBDA......END -> NONOP FRED;
