reverse polish notation (haskell)