I have the following code statement:
let execute command =
match command with
|Skip -> ()
|Changestate (l,r) -> (let l = ref r)
|_ -> failwith "Not a command"
when I run this in the toplevel, I get the following error:
1 let execute command =
2 match command with
3 |Skip -> ()
4 |Changestate (l,r) -> (let l = ref r)
5 |_ -> failwith "Not a command";;
6 Error: Syntax error
The syntax error appears to occur at the parenthesis at the end of line 4. What I would like this line to do is to change the value at l to a reference variable to r, but return no actual value.