<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">How do I get the x out of Just x?<br><br>Michael<br><br>=============<br><br>safeDivision :: Float -> Float -> Maybe Float <br>safeDivision x y = if y == 0 then Nothing else Just (x/y)<br><br>*Main Data.List> safeDivision 10 5<br>Just 2.0<br>*Main Data.List> 3 + (safeDivision 10 5)<br><br><interactive>:1:0:<br> No instance for (Num (Maybe Float))<br> arising from a use of `+' at <interactive>:1:0-22<br> Possible fix: add an instance declaration for (Num (Maybe Float))<br> In the expression: 3 + (safeDivision 10 5)<br> In the definition of `it': it = 3 + (safeDivision 10 5)<br>*Main Data.List> <br><br></td></tr></table><br>