I do F # Interactive.
I get strange results, but here I can not explain:
The following code returns 66, which is the expected value.
> let fx = 2*x*x-5*x+3;; > f 7;;
The following code generates a syntax error:
> let fx = 2*x*x - 5*x +3;; stdin(33,21): error FS0003: This value is not a function and cannot be applied
As you can see, the only difference is that there are spaces between the characters in the second example.
Why does the first code example work and the second a syntax error?
source share