1
Hello, I need to create a predicate that will return all the ancestors of a person. The point is that I can only pass one parameter to that function.
ancestor(Y, X) :- parent(Y, X).
ancestor(X) :- parent(Y, X), ancestor(Y, X).
Using two arguments in the second 'Ancestor' I can reach the expected result, however I need to pass only one argument as above.