mr-niels-christensen / pyrules

MIT License
0 stars 0 forks source link

Add bacon&eggs test #5

Closed mr-niels-christensen closed 10 years ago

mr-niels-christensen commented 10 years ago

Bacon&eggs is a simple "mutual recursion"-like example along these lines:

r.add_rule(('good', ('bacon', 'X')),
           ('nice', 'X'))
r.add_rule(('nice', ('eggs', 'X')),
           ('good', 'X'))
r.add_fact(('good', 'toast'))
r.add_fact(('nice', 'beans'))