Checkpoint
This commit is contained in:
parent
9db1c66781
commit
724e911a6f
17 changed files with 288 additions and 95 deletions
|
@ -18,7 +18,12 @@ import prolog.logic.unifyLazy
|
|||
*/
|
||||
class Write(private val term: Term) : Operator(Atom("write"), null, term), Satisfiable {
|
||||
override fun satisfy(subs: Substitutions): Answers {
|
||||
val t = applySubstitution(term, subs)
|
||||
var t = term
|
||||
var temp = applySubstitution(t, subs)
|
||||
while (t != temp) {
|
||||
t = temp
|
||||
temp = applySubstitution(t, subs)
|
||||
}
|
||||
|
||||
Terminal().say(t.toString())
|
||||
|
||||
|
|
Reference in a new issue