TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual


DryReplace ( dry D, any source, any target ) -> dry


Return the dry derived from replacing the element `source' in `D' by `target'.
If `source' is in `D' it is removed and `target' is added such that the result stays a dry.
If `source' is not in `D' then `D' is returned as is. No error is raised in this case.
Note: Technically this is nothing but
if source in D then DryAdd(DryRemove(D,source),target); else D; fi;
but it is more efficient since the dry need not be resized.

Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group