How can I explicitly mark the type of let myList = [1, 2, 3];
as a list of int's
?
I tried let xs: 'int list = [1,2,3];
unsuccessfully through Try ReasonML.
How can I explicitly mark the type of let myList = [1, 2, 3];
as a list of int's
?
I tried let xs: 'int list = [1,2,3];
unsuccessfully through Try ReasonML.
It's let xs: list(int) = [1,2,3];
in Reason or let xs: int list = [1; 2; 3]
in OCaml.