In most cases, the default behavior of augmented assignment gives the desired result. But in some situations, it may be useful to override this behavior and install a custom method for a given type.
Consider the following example.
|
|
|
|
|
|
Note that an intermediate Foo object was created and then assigned to x. Instead, it would be more efficient if x was modified directly.
|
|
In some cases, it may be useful to fall back on the default behavior of the given operator. When this is desired, the installed method should return the Default symbol.
|
|
|
|
|
|
|
|
The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Macaulay2Doc/operators/augmented_assignment.m2:83:0.