Why does SWI-Prolog only give me the first answer?

前端 未结 1 353
你的背包
你的背包 2021-01-12 05:07

I\'m new to Prolog. I\'m just trying simple examples to learn. I have this .pl file with these lines:

parent(pam,bob).
parent(tom,bob).
parent(t         


        
相关标签:
1条回答
  • 2021-01-12 05:32

    don't hit enter after your first results shows, use spacebar instead

    • [Enter] stops execution even if the backtracking is not completed yet
    • [Spacebar] or [;] continues with backtracking from your last result to the next result or false if there are no other results left.
    0 讨论(0)
提交回复
热议问题