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.../examples/basics/fraternity.pl
2025-03-30 21:56:24 +02:00

17 lines
363 B
Prolog

age(robespierre, 25).
age(danton, 29).
age(marat, 35).
age(camus, 22).
age(desmoulins, 19).
eligible_for_event(Person) :-
age(Person, Age),
between(20, 30, Age).
:- initialization(list_eligible_members).
list_eligible_members :-
eligible_for_event(Person),
write('Citizen '), write(Person), write(' is eligible for the event.'), nl,
fail.