2 Answers
2

As already mentioned, the problem is not in the piece of code you posted - it looks like some other part of your program makes the F# compiler think that the expression fuzzyVars <- var :: fuzzyVars should have a type that admits null (but that's not the case, because it returns unit).

You probably do not have something like this in your code :-) but perhaps the error message might give you a pointer to where the null comes from. Here, I get:

error FS0001: The type 'unit' does not have 'null' as a proper value. See also C:\Users\Tomas\AppData\Local\Temp\~vs648E.fsx(8,0)-(8,4).

And the code on line 8 between character 0 and 4 is the null value! So perhaps check out whether the error message gives you some more information? Or try looking for null elsewhere in your code... (It might be also caused by some unexpected indentation.)