title: How to go back to "repeat" in Prolog?
body: <p>Is it possible to go back to a <code>repeat</code> in Prolog without calling the predicate and without making a new predicate?</p>
  <p>I have the following code</p>
  <pre><code>test :- nl,
  write('Welcome.'),nl,
  repeat, write('Print this message again? (yes/no)'),nl,
  read(Ans),nl,
  (
      Ans == yes -&gt; write('You selected yes.'), nl
  ;
      write('You selected no.')
  ).
  </code></pre>
  <p>The current output I get is</p>
  <pre><code>Welcome.
  Print this message again? (yes/no)
  yes.
  You selected yes.
  true.
  </code></pre>
  <p>Program end.</p>
  <p>The output I want is</p>
  <pre><code>Welcome.
  Print this message again? (yes/no)
  yes.
  You selected yes.
  Print this message again? (yes/no)
  no.
  </code></pre>
  <p>Program ends.</p>
  <p>The easy output way I want to avoid (I don't want this output. I don't want it shows Welcome multiple of times):</p>
  <pre><code>Welcome.
  Print this message again? (yes/no)
  yes.
  
  Welcome.
  You selected yes.
  Print this message again? (yes/no)
  no.
  </code></pre>
  <p>Program ends.</p>