<div>Hi</div>
<div>   I&#39;m trying to get a if statement to work but not sure if this is the right approach, what I want to do in simple english is to evaluate  one expression at a time for example. (3+2)+(4+5) I want it to return 5 + (4+5) then 5+9. </div>

<div> </div>
<div>data Expression = Val Integer<br>                | Add Expression Expression<br>                | Subtract Expression Expression<br>                | Multiply Expression Expression<br>                | Divide Expression Expression<br>
         deriving Show<br>evalStep :: Expression -&gt;  Expression<br>evalStep (Val x)=  (Val x)  </div>
<div><br>evalStep (Add x y) = do<br>               <br>  if x = isDigit<br>           then if y isDigit<br>             else evalStep x,y</div>
<div> </div>
<div>I thinking about using recursion down a tree left then right but that seems very complicated.</div>
<div>Any thoughts welcome!</div>
<div>John</div>