<div>Hi,</div>
<div> I'm trying to find a way to parseRPN (Reverse Polish Numbers) to expressions rather than to just numbers. e.g. I want the answer to be in the form <font size="3" face="CMTT10"><font size="3" face="CMTT10">
<p>(Multiply (Val 2) (Val 3)) rather than just the answer.</p>
<p> </p>
<p>Are these anyway near the steps</p>
<div>parseRPN :: String->Expression</div>
<div> </div>
<div>This is a lot more complicated then I thought.!!!</div>
<div> </div>
<div>First do we have to read in a string is this (IsString)</div>
<div> </div>
<div> fromString :: String -> a</div>
<div> </div>
<div>Then this goes on a stack</div>
<div> </div>
<div>pushStack :: a -> Stack -> Stack (Takes a value and puts in on a stack)</div>
<div> </div>
<div>Later we pop it off</div>
<div> </div>
<div>popStack :: Stack -> (a,Stack) -- takes the value of the stack and leaves the stack</div>
<div> </div>
<div>Do we also have to define taking off the stack such as head(popstack) or fst(popstack) if we do we would probably have one for putting it onto a stack. </div>
<div> </div>
<div>Do we then turn the value into an Expression.?</div></font></font></div>