I get several results with the same outputs.
I want to get jack,jane only one time, but I get it two times.
How can I avoid this? I tried setof but I couldn’t get it done. Please can someone help me on this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This question is duplicated in “How to stop repetitions in rules in prolog”.
An answer is to do something like this:
Read the full answer for more detail.