Prolog understanding setof/3 with ^ markings [duplicate]
问题 This question already has answers here : What is the Prolog operator `^` (“caret”)? (4 answers) Closed 10 months ago . Could someone explain to me what this is doing? (\+ setof((P1,C),P^R^Bag,PS) -> ... otherwise ->... I have read the documentation of setof; my understanding is that the thrid argument gets unified with the facts. However, I can't make sense of the code snippet above. The full snippet is: solve_task_bt(go(Target),Agenda,ClosedSet,F,G,NewPos,RR,BackPath) :- Agenda = [Current