Quick answer: You don't want to do that.
Longer answer: The father/2
predicate has a certain meaning, namely that for father(X,Y)
X
is the father of Y
. A father/3
predicate is a different thing altogether. What do you want to achieve with that third argument? Normally, you use additional rules, which derive things from the father/2
predicate, or even resolve it to a father/3
argument.
The main question remains: what's the purpose of the third argument? If you want your resolution to work for certain specific 3rd arguments based on the existance of a corresponding father/2
predicate for example, you could do father(X, Y, 'something') :- father(X,Y)
which will succeed if you have a corresponding father/2
fact.
PS: Do learn your terminology. In Prolog we don't speak of procedures and we don't write functions. Instead we have predicates, facts, rules, ...
PPS: I am not sure which Prolog implementation you are using, but you might want to use 'something'
instead of "something"
. The latter usually creates a list of character codes, not a string:
?- X = 'some'.
X = some.
?- X = "some".
X = [115, 111, 109, 101].