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

11 lines
261 B
Prolog

likes(alice, pizza).
likes(alice, pasta).
likes(bob, pasta).
:- initialization(main).
main :-
forall(likes(X, pizza), X = alice),
write('Only alice likes pizza.'), nl,
forall(likes(X, pizza), X = bob),
write('Bob should not like pizza.'), nl.