let empties = Array.create 100 []
Gives a value restriction error:
error FS0030: Value restriction. The value 'empties' has been inferred to have generic type val empties : '_a list []. Either define 'empties' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation.
While this doesn't:
let makeArray () = Array.create 100 []
So what is the difference? I know there is a tradition for SO questions to include "what you have tried", but I don't even know what to try, it's a conceptual question...
emptiesis a value andmakeArray ()is a function. - Guy Coderempties is a value and makeArray () is a function, i still do not understand why the first gives value restriction error while the second doesn't? either case is supposed to be generic.. - Bad