title: How can I split a list in Prolog to several lists containing 3 items?
body: <p>My problem is, that I want to make a rule for splitting a list to several lists, containing only 3 items from the original, in order.</p>
  
  <p>For example:</p>
  
  <pre><code>/*original list:*/ 
  Fruits=[apple,banana,orange,pear, lemon, melon]
  
  ?-Split(Fruits).
  
  /*results:*/ 
  [apple,banana,orange];
  [banana,orange,pear];
  [orange,pear,lemon];
  [pear,lemon,melon].
  </code></pre>
  
  <p>Is there any way to do this? :S </p>