I am looking for a way to define global variables in ocaml so that i can change their value inside the program. The global variable that I want to user is:
type state = {connected : bool ; currentUser : string};;
let currentstate = {connected = false ; currentUser = ""};;
How can I change the value of connected and currentUser and save the new value in the same variable currentstae for the whole program?