plug(expression,assignment) → expression
The subroutine plug takes an expression and a variable assignment as arguments and returns the result of applying the variable assignment to the expression.
Call: plug(read('p(X,Y)'),{X:a, Y:b})
Exit: p(a,b)
Call: plug(read('p(X,X)'),{X:a, Y:b})
Exit: p(a,a)
Call: plug(read('p(Y,Z)'),{X:a, Y:b})
Exit: p(b,Z)
|