<div style='font-family:Arial; font-size:13px;'>Hi,<div><br></div><div>tensDigit.hs</div><div><br></div><div>tensDigit :: Integral a => a ->a<br>tensDigit x = d<br>  where xLast = x `div` 10<br>            d         = xLast `mod` 10<br><br>prelude> load tensDigit.hs</div><div><font color="#ff0000">parse error on input ‘=’</font></div><div><div><font color="#ff0000">Perhaps you need a 'let' in a 'do' block?</font></div><div><font color="#ff0000">e.g. 'let x = 5' instead of 'x = 5'</font></div><div><font color="#ff0000">4 |             d         = xLast `mod` 10   |                       ^</font></div><div><font color="#ff0000">[1 of 1] Compiling Main             ( chapter7_8.hs, interpreted )</font></div><div><font color="#ff0000">Failed, no modules loaded.</font></div><br><br><div><div style="font-family:Arial; font-size:13px;">I suspect this has something to do with the spacing (since this is example code) if so could someone explain to me what the rules on spacing are so I can get past this. I am using a simple text editor so if someone has a recommendation for an IDE that simply takes care of this, much obliged!!</div></div></div><div style="font-family:Arial; font-size:13px;"><br></div><div style="font-family:Arial; font-size:13px;">best,</div></div>