0

enter image description here enter image description here

Based on the code in the pics, How can I bind those unbounded variables with processing the structure? For example, how can I let the X=1,Y=2 for the example in first pic.

a more clear example:

I asked another question to be more specific. if it is still unclear,whatever.

how to do Arithmetic Operations in DCG in prolog

Community
  • 1
  • 1
SwordW
  • 592
  • 2
  • 6
  • 20

1 Answers1

1

Your question is still unclear. You don't bind anything "manually", do you?

Do you mean that you do the unification in the head of the predicate?

foobar(1, 2) --> [1, 2].

(A trivial example, since I don't know if this is what you are asking.)