title: Getting an order into predicate resolution
body: <p>Look at the following goals (I am using swi-prolog with clpfd from Markus Triska):</p>
  
  <pre><code>result(Input,Result) :-
      Input #&gt; 10,
      Result=decline.
  result(Input,Result) :-
      Input in 0..20,
      Result=offer.
  </code></pre>
  
  <p>A possible query looks like this:</p>
  
  <pre><code>?- result(15,B).
  B = decline ;
  B = offer.
  </code></pre>
  
  <p>I want to add an order or some sort of solution priority. 
  If "decline" is a valid response for <code>Input=15</code>, then the second goal should not be considered anymore, so that only <code>B=decline</code> is a solution but not <code>B=offer</code>.</p>
  
  <p>I know that I could add a <code>!/0</code> but then the other way round would not work. Give me all possible answers for this predicate. </p>
  
  <p>Considering this example, a <code>Result=offer</code> should only be true for <code>Input 0..10</code>, because otherwise the higher prior decline goal should fire.</p>
  
  <p>Am I thinking too imperative when I try to consider an order within predicates? </p>