title: Prolog - how to do setof that returns empty list instead of failing
body: <p>I need an ordered list of Objects that satisfy Goal. <code>setof</code> takes care of the ordering, but fails when no Objects satisfy Goal. I want to return an empty list instead like <code>findall</code> does.</p>
  
  <p>This works, but is there a way of accomplishing this without a cut? I'm using SWI-Prolog.</p>
  
  <pre><code>setof(Object, Goal, List), !; List = [].
  </code></pre>