0

如何将类型明确标记let myList = [1, 2, 3];为 a list of int's

let xs: 'int list = [1,2,3];通过Try ReasonML尝试失败。

4

1 回答 1

6

let xs: list(int) = [1,2,3];在 Reason 或let xs: int list = [1; 2; 3]OCaml 中。

于 2018-02-10T21:27:30.160 回答