title: Prolog, create a predicate that grab 3 diagonal values from 3 lists
body: <p>Hi so I have 3 lists = [1,2,3], [4,5,6], [7,8,9]</p>
  <p>I want to create a predicate that create 2 list using the diagonal values from the 3 list.</p>
  <p>Here is some example of using said predicate:</p>
  <pre><code>?- diagonal([1,2,3], [4,5,6], [7,8,9], D1, D2).
  D1 = [1,5,9],
  D2 = [3,5,7].
  
  D1 = [3,5,7],
  D2 = [1,5,9].
  </code></pre>
  <p>Right now I can only think of hard-coding it but it would only give back only 1 answer instead of letting me press space and get the second one.</p>
  <p>Anything helps.</p>