let ceiling = 1000 -1
fails with "This value is not a function and cannot be applied" Why? The whitespace. As it parses now, F# is attempting to call the 1000 function with a parameter of -1*. If either the space between the 0 and - is removed or if an extra space is inserted between the - and the 1, then it will work. F# doesn't know what to do with negative one, but does know how to add negative one to 1000. Any of the following three would work
*At least, that's my guess. Seems reasonable enough at this point
let ceiling1 = 1000-1
let ceiling2 = 1000 - 1
let ceiling3 = 1000 + -1
No comments:
Post a Comment