next up previous contents index
Next: zero? Up: AdditiveType Previous: +,-   Contents   Index


add!,minus!


Usage

add!(x, y)
minus!(x, y)
minus! x


Signatures

minus!: % $\to$ %
add!, minus!: (%, %) $\to$ %


Parameter Type Description
x, y % Elements of the type


Returns

add!($x,y$) and minus!($x,y$) returns respectively $x + y$ and $x - y$, while minus! x returns the opposite of $x$. In all cases, the storage used by x is allowed to be destroyed or reused, so x is lost after this call.


Remarks

Those functions may cause x to be destroyed, so do not use them unless x has been locally allocated, and is guaranteed not to share space with other elements. Some functions are not necessarily copying their arguments and can thus create memory aliases.


See Also

+,-



Manuel Bronstein 2004-06-28