I'm an F# beginner. I ran this code:
let printMsg() =
let msg = "Important"
printfn "%s" msg
let innerMsgChange() =
let msg = "Very Important"
printfn "%s" msg
printfn "%s" msg
innerMsgChange()
printfn "%s" msg
printMsg()
I expected that text output would be in this sequence:
Important, Very Important, Important, Important
or this
Important, Very Important, Very Important, Important
but I got this
Important, Important, Very Important, Important
it seems that these functions don't comply with code execution order. Why is that, am I missing something?