let empties = Array.create 100 []
给出一个值限制错误:
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.
虽然这不是:
let makeArray () = Array.create 100 []
那么区别是什么呢?我知道 SO 问题的传统包括“你尝试过什么”,但我什至不知道该尝试什么,这是一个概念性问题......