How can I specifically define a new array of a specific type T ?
Strangely, I couldn’t find any helpful information about it..
I want to write something like this:
let arr = new Array()
only that the elements of arr must be of type T.
How can I do it on F# ?
Maybe the
Array.init<'T>andArray.create<'T>functions are what you are looking for.Also consider using a
Sequenceinstead of an array.