In Prolog using the cut. Why is the effect of the following query to return the following:
?- !,false.
no
yet this query returns the following:
?- !;false.
yes
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.
The first query performs an AND on ! (which always returns yes) and false, which always returns no. yes AND no = no.
In the second query, the ! commits execution to the first branch, that is, !, which always returns yes.