title: Lazy lists in Prolog?
body: <p>Is it possible to have lazy lists in Prolog? Something like the following:</p>
  
  <pre><code>ones([1 | Y]) :- ones(Y).
  </code></pre>
  
  <p>Although this obviously doesn't work as it's written.</p>