dragonwasrobot / learn-prolog-now-exercises

My solutions to the exercises and practical sessions of the book 'Learn Prolog Now!' by Patrick Blackburn, Johan Bos, and Kristina Striegnitz.
288 stars 81 forks source link

Update exercises.pl #5

Closed Michael-Zp closed 9 years ago

Michael-Zp commented 9 years ago

The function greater_than gives allways true without the change, because the successor of X isn`t reduced and will stay the same.

greater_than(succ(0), succ(succ(0))). --> greater_than(succ(0), succ(0)). --> greater_than(succ(0), 0). --> true.