Following is the function, which I wrote in F# editor and it works as I expected (answer:18).
let quadruple x = x*2
let cal(u:int) = quadruple u + 10;
let result = cal 4
But if I change the order of code, such as
let cal(u:int) = quadruple u + 10;
let quadruple x = x*2
let result = cal 4
I am getting "the value or constructor 'quadrule' not defined". From the error, I presume, the failure is due to a function call before its declaration. For me, it something like an interpreter style.
Question: Why such constrains ? Is this purposeful to keep some compatibility issue ? Or is it because I don't have any module/class defined ?