.he 'UPDATER''Page %'
.fo 'Steven Hardy'- % -'October 1977'
UPDATER	A function for accessing a data structure has two independent
tasks to perform.  One is to extract the contents of the appropriate
component;  the other is to change the contents of the components.
Thus:
 	: HD(X) -> V; V -> HD(X);
.br
Two separate functions are needed therefore;  the updating function is
stored as one component of the selector function - in fact as its 
UPDATER.
.br
When a function call follows an assignment arrow (i.e. ->)
the UPDATER part of the function is called, so that instead of 
executing:
 	: V -> F(X);
.br
.tp5
we could execute:
 	: UPDATER(F)(V,X);
.br
Most functions, of course, have no UPDATER.  If we define a new data
structure accessing function it is sensible to give it an UPDATER, for
example:
 	: FUNCTION SECOND(LIST);
 	:	HD(TL(LIST))
 	: END;
 	: FUNCTION SETSECOND(VALUE,LIST);
 	:	VALUE -> HD(TL(LIST))
 	: END;
 	: SETSECOND -> UPDATER(SECOND);
 	: VARS L; [A B C D] -> L;
 	: SECOND(L) =>
 	** B
 	: "E" -> SECOND(L);
 	: L =>
 	** [A E C D]
