Reputation: 9057
In my SML code this line is not running
if check(e1) == Num and check(e2) == Num then Num else raise TypeError "ill-typed"
I get a compile error Error: syntax error: replacing AND with ANDALSO
Does anyone know why this is not compiling?
Upvotes: 2
Views: 314
Reputation: 4733
and
is a very different keyword in SML from what you think. and
is used for defining mutually recursive functions, while andalso
is the keyword used for boolean and.
Also, note that ==
is not equality checking in SML. =
is.
Upvotes: 4