apply

abstract fun apply(substitution: Substitution): T

Applies a Substitution to the current object, producing a new instance of T which differs from the current object because variables are replaced by their values, according to the binding carried by substitution.

Notice that, if the current object is ground, or the provided substitution is empty, the same object may be returned as a result by this method.

Return

an instance of T where variables in substitution are replaced by their values

Parameters

substitution

is the Substitution to be applied to the current object

Throws

if the provided substitution is of type Substitution.Fail


open fun apply(substitution: Substitution, vararg substitutions: Substitution): T

Applies one or more Substitutions to the current object, producing a new instance of T which differs from the current one because variables are replaced by their values, according to the binding carried by the provided substitutions.

This method behaves like apply(Substitution), assuming that the provided substitutions have been merged by means of Substitution.of.

Return

an instance of T where variables in substitution are replaced by their values

Parameters

substitution

is the first Substitution to be applied to the current object

substitutions

is the vararg argument representing the 2nd, 3rd, etc., Substitutions to be applied

See also

Throws

if the composition of the provided substitutions is of type Substitution.Fail