retract

abstract override fun retract(clause: Clause): RetractResult<MutableTheory>

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 override fun retract(clauses: Iterable<Clause>): RetractResult<MutableTheory>
abstract override fun retract(clauses: Sequence<Clause>): RetractResult<MutableTheory>

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

See also


open override fun retract(head: Struct): RetractResult<MutableTheory>

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