On Sep 17, 2009, at 20:17 , xu zhang wrote:
case op of
And -> let a = 4
Or -> let a = 3
Implies -> let a = 2
Equiv -> let a = 1
"let" isn't an assignment command, it's a scoping command. That is,
> let a = 3 in ...
is equivalent to something like
{ int a = 3; ... } // except the type can be inferred
Note that the "in" is required unless part of a do-block, where block structure is implied.
--
electrical and computer engineering, carnegie mellon university KF8NH