I would like to create an argument that succeeds when a list proceeds another list.
For example ?-proceed_list([1,2],[2]). Yes or True(whatever the compiler).
Can anyone help me?
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.
Your question is hard to parse. As aqua commented, you should rephrase it. For what it’s worth, I understand your example that you want to check whether the second list
[2]is the tail of the first[1,2](i.e., “proceed” in the sense of “continue”). If that’s what you want, then this should work: