The subroutine addcontent takes a sentence and a dataset or a ruleset as argument and adds the specified sentence to the end of the specified dataset or ruleset. It returns the specified sentence as value.
Call: lambda = readdata('p(a,b) p(b,c) p(c,d)')
Exit: ...
Call: grind(addcontent(read('p(d,e)'),lambda))
Exit: p(d,e)
Call: grind(addcontent(read('p(b,c)'),lambda))
Exit: p(b,c)
Call: grindem(lambda)
Exit: p(a,b) p(b,c) p(c,d) p(d,e) p(b,c)
Note that addcontent does not check for duplicates.
|