Simple Reverse Polish notation - Coding exercise