Reverse polish notation in haskell.