Getting an order into predicate resolution
Look at the following goals (I am using swi-prolog with clpfd from Markus Triska): result(Input,Result) :- Input #> 10, Result=decline. result(Input,Result) :- Input in 0..20, Result=offer. A possible query looks like this: ?- result(15,B). B = decline ; B = offer. I want to add an order or some sort of solution priority. If "decline" is a valid response for Input=15 , then the second goal should not be considered anymore, so that only B=decline is a solution but not B=offer . I know that I could add a !/0 but then the other way round would not work. Give me all possible answers for this