Mutable TermsAuthor(s): Rémy Haemmerlé.
Version: 2.0 (2010/8/9)
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 backtracking. 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 which does not have safe semantics.
Usage and interface
Documentation on exports
- Description: Unifies Datum with a freshly created mutable term with initial value Datum.
- Description: Unifies Datum with the current value of the mutable term Mutable. Mutable must be a mutable term.
- Description: Updates the current value of the mutable term Mutable to become Datum. Mutable must be a mutable term.
- Description: Succeeds if Term is currently instantiated to a mutable term.