-2

I need to write a function that takes an arithmetic expression and converts it to a string in Reverse Polish notation using Haskell. Creating a function to evaluate an RPN expression is quite easy and need not to worry about, it's only the conversion from arithmetic to RPN that's troubling.

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
lehal475
  • 1
  • 2

1 Answers1

1

You could look at parsec for parsing the string. It's powerful and enables you to implement robust parsing. You can then build a data structure out of the input string which you then pass to your RPN logic.

CalumMcCall
  • 1,665
  • 4
  • 24
  • 46