retract

abstract fun retract(clause: Clause): RetractResult<Theory>

Tries to delete the first clause in this theory unifying against the given clause, returning a RetractResult.Success wrapping the resulting Theory and the removed clause, or a RetractResult.Failure wrapping this same theory if no clause matched.


abstract fun retract(clauses: Iterable<Clause>): RetractResult<Theory>
abstract fun retract(clauses: Sequence<Clause>): RetractResult<Theory>

Tries to delete, from this theory, one clause unifying against each of the given clauses patterns.

See also


Tries to delete a clause whose head unifies against the given head; equivalent to retract(Rule.of(head, _))