installAssignmentMethod(op,X,Y,f)
If the operator is a unary operator, just omit X and its comma.
We illustrate this function by defining a type of mutable list whose elements can be both extracted and replaced using the operator _. We also install a method for net so objects of the class can be printed.
|
|
|
|
|
|
|
|
|
The object installAssignmentMethod is a method function.