title: Making a list from a tuple
body: <p>I am trying to make a list from a tuple of variable size. However, I am having trouble figuring out how to represent an empty tuple (or a tuple with a single value in it), which I need as my end case.</p>
  
  <p>This is what I have right now which, judging by the trace, does create a list (reversed however but it's not really a problem) but it fails at the very end.</p>
  
  <pre><code>tuple_to_list((), []).
  tuple_to_list((X, ()), [X]).
  tuple_to_list((X, XS), List) :-
      tuple_to_list(XS, [X|List]).
  </code></pre>