title: Implementing nth1 list operation in SWI prolog
body: <p>How would you code your own predicate in Prolog, to do exactly what the nth1 function does?</p>
  
  <p>For those not familiar with that function, its power is best displayed through an example:</p>
  
  <p>?- nth1(2, [a,b,c], E, R).</p>
  
  <p>E = b</p>
  
  <p>R = [a, c]</p>
  
  <p>When the nth1 function is called, and is passed the following:
  - an index of an element, of which is to be removed from the list (note that it is not zero-indexed, and that here, we are passing index 2)
  - the list (in this case, it is [a,b,c])
  - E, which will be assigned the element that was removed from the list
  - R, a new list, which will hold the new list, minus that one element that was removed.</p>
  
  <p>I'm stomped on how to start. Any advice would be appreciated. I know that it should be do-able using recursion in about 3 or 4 lines in SWI-Prolog, I just have no idea where to start.</p>