title: A program to evaluate arithmetic expression
body: <p>Here's an interesting problem I haven't managed to deal with yet.</p>
  
  <p>Given an arithmetic expression in <a href="https://en.wikipedia.org/wiki/Reverse_Polish_notation" rel="nofollow noreferrer">Reverse Polish Notation</a>, write a program to evaluate it.</p>
  
  <p>The expression is given as a list of numbers and operands. For example <code>[5, 3, '+']</code> should return <code>5 + 3 = 8</code>.</p>
  
  <p>For example,</p>
  
  <pre><code>[15, 7, 1, 1, '+', '-', '/', 3, '*', 2, 1, 1, '+', '+', '-']
  </code></pre>
  
  <p>should return <code>5</code> since it is equivalent to <code>((15 / (7 - (1 + 1))) * 3) - (2 + (1 + 1)) = 5</code>.</p>