Prolog Example 1
Prolog Example 1
Let's start with a simple example to understand the terminologies. We will provide Facts
and Rules to the prolog system and then we will ask queries and we will see what prolog
interpreter returns as an answer and why.
Rules
meal(X) :- food(X). // Every food is a meal OR
Anything is a meal if it is a food