This question already has an answer here:
- Reverse Polish notation 43 answers
Your task is to create a polish notation calculator.
For those who don't know what is polish notation, it's a mathematical notation where operators are before the operands.
+ 1 2 =
1 + 2
Your calculator should implement integer addition, substraction multiplication and division.
Standard loopholes are forbidden but you are allowed to use a language even if it's newer than the challenge.
eval is also forbidden.
Input: + 1 2 Output: 3 Input: * + 3 4 2 Output: 14 Input: / * + - 3 2 9 3 2 Output: 15
Since this is code-golf, the answer with the less bytes win !