I need a help for create this rule in Prolog.
This is the question: Create fact and rule for Prolog.
- burger is a food.
- sandwich is a food.
- pizza is a food.
- sandwich is a lunch.
- pizza is a dinner.
- every food is a meal OR Anything is a meal if it is a food.
ps. it's not homework, it's myself assignment i want know how to create this rule correctly.
food(burger).
food(sandwich).
lunch(sandwich).
dinner(pizza).
meal(X) :- food(X) ; ...