title: Consecutive elements in a list
body: <p>I'm blocking on a predicate to code in <strong>Prolog</strong>. I need to code that two predicates:</p>
  
  <p>If I call : <code>u([a,b,c,d,e,f], X).</code> it will give <code>X=[a,b], X=[b,c], X=[c,d]</code> ...</p>
  
  <p>If I call : <code>v([a,b,c,d,e,f], X).</code> it will give <code>X=[a,b], X=[c,d], X=[e,f]</code> ...</p>
  
  <p>Thanks a lot!</p>