[mercury-users] Re: unsorted_solutions/2

Bart Demoen bmd at cs.kuleuven.ac.be
Fri Oct 24 22:58:05 AEST 1997


Fergus quotes from what Don wrote to him:

> Similarly, I'm all in favor of a one_solution/2 predicate which returns
> an (arbitrary) solution to its first argument in the second, in any
> context.


I agree wholeheartedly with Don - maybe for different reasons, but
that's ok. For me a one_solution/2 predicate will help me in
convincing the Mercury compiler that some goal is det, but more
importantly, it will let me reuse code more easely.

Both can be achieved in other ways, but these ways are awkward
compared to using a one_solution/2 predicate ! I think.

> in the presence of negation it would be unsound
It depends on how the negation is present, no ?


Bart




More information about the users mailing list