I am trying to write a predicate that writes out all the ways from one node to another in a acyclic graph. If I example have these nodes/edges.
node(x,y).
node(x,z).
node(y,z).
And then I have tried something like:
predicate(X,Y):-
node(X,Y),
...
but somehow I need to do this recursively which I need help with. Anyone got any ideas? Thanks