title: Prolog - How can obtain the prefix form of a math calculation given its usual form?
body: <p>I'm new in prolog and I would like to program a calculator. For that I need to program a predicate that process the given arithmetic expression, written in the usual form (infix form), such that to obtain its prefix form. 
  The elements of the expression will be grouped into sublists with 3 elements, of the following form [operator, term1, term2], such that the terms can be in their turn lists. 
  A predicate called parse should be defined and work like in this example:</p>
  
  <pre><code>?-parse([1,+,2,*,3],PF).
  PF=[+,1,[*,2,3]] 
  </code></pre>