Stanislau Venikman Niadbailau blog

RPNC

· Stanislau

Reverse Polish notation calculator§

This is another way to do calculation. Even now some of modern calculators support this notation. But where I have learned it? Haskell! Yes, by reading book about Haskell I was able to learn this new thing.

From Wiki we can see that this is notation where operators (-, +, *, /) follows by operands (simple way to explain it is: numbers). Here is some of expamples:

4 5 + // 4 + 5

1 5 - // 1 - 5
10 1 5 + 2 * - // 10 - ((1 + 5) * 2)

I am not sure if I will have any other chance to learn this notation on other situation. But this is very interesting thing where by trying to learn as my primary goal, which is learn new programming language Haskell I can get bonus like this.