In SML I must use the else
part , since those are the rules of the language .
How can I do nothing in the else
condition then ?
fun calc(input : string ) : int =
let
val outStr = ref "someString"
val outInt = ref 0
in
outInt := (validateHelper(input) handle _ => ~1);
if (outInt <> ~1)
then
( outStr := replaceRomanDec(input); (* replace roman number with decimal *)
outInt := (calcMyRomanExpression(!outStr) handle _ => ~1);
)
else (* nada *)
!outInt
end;