I\'m very new to Prolog. I have such a graph:
edge(a,e). edge(e,f). edge(f,d). edge(d,a).
I define a transitive closure as:
p(