As title stated above, how to make this possible? For example:
**Facts:** parent(child, parent). parent(child, parent2). parent(child2, parent). parent(child2, parent2). **Rules:** childof(X,Y) :- parent(Y, X). number_of_child(X,Y):- X has Y number of child
How should I implement the number_of_child rules? My expected answer is Y will show 2 (since there are child and child2) or something like that. Thank you.