This repository has been archived on 2025-09-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2025LogProg-project-GhentPr.../tests/better_parser/resources/parent.pl
2025-04-27 11:08:28 +02:00

10 lines
207 B
Prolog

male(john).
male(jimmy).
female(mary).
parent(john, jimmy).
parent(mary, jimmy).
father(X, Y) :- parent(X, Y), male(X).
mother(X, Y) :- parent(X, Y), female(X).
foo(0).
foo(X) :- X > 0, Y is X - 1, foo(Y).