users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storing multiple solutions in a list


From: Kandan Venkataraman
Subject: Storing multiple solutions in a list
Date: Sat, 5 Aug 2006 13:27:08 +1000 (EST)

Hi

I am new to prolog. I have the following question

Assume I have a predicate defined f(X,Y) taking two parameters.

If X is a variable, or a partially instantiated variable (i.e. it is a structure), then assume X can have multiple solutions depending on the value of Y.

How do I store the multiple solutions of X in a list. The problem I am having is that once X is bound to a value, I am
unable to unbind it , to find the next solution to store in the list.

Maybe there is a differrent way of doing it, but I am stuck at the moment.


Thank you
Kandan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]