Re: Floyd warshall



I tried with a very small example

prova(X,Y) :-
dist(X,Y,Z), Z > 2 ->
write('maggiore'); write('minore'),write(Z).

?- prova(0,1).
minore_L136

So in the "else branch" Z is not unified anymore, why?? I dont' find a
suitable explanation..
How can I translate this little piece of code?

.