Mutable TermsAuthor(s): Rémy Haemmerlé.
This module provides mutable terms i.e. an abstract datatype provides with efficient backtrackable destructive assignment. In other words, any destructive assignments are transparently undone on baktracking. Modifications that are intended to survive backtracking must be done by asserting or retracting dynamic program clauses instead. Mutable must be prefered to destructive assignment of arbitrary terms using setarg/3 of the module odd which does not have safe semantics.
Usage and interface
Documentation on exports
Unifies Datum with a freshly created mutable term with initial value Datum.
Unifies Datum with the current value of the mutable term Mutable. Mutable must be a mutable term.
Updates the current value of the mutable term Mutable to become Datum. Mutable must be a mutable term.
Succeeds if Term is currently instantiated to a mutable term.