在我看到这些问题之后,我试图解决以下问题。但我无法解决。谁能帮我 ?
predefined :
foo( X, Y ) bar( Y, Z )
^ ^ ^ ^
all of them is atomic, that is they only return or take one value at a time
sample example:
foo(john, brad).
bar(john, marry).
foo( Y, brad)
Y = john % after pressing a, all possibilities will be seen at terminal
bar(Y, Z )
Z = marry % after pressing a, all possibilities will be seen at terminal
%..................
对于这些情况,我如何在 foo 的 eash 运行后产生 Y 的所有可能性来运行 bar?