In C# and Java a byte array can be created like this
byte[] b = new byte[x];
where x
denotes the size of the array. What I want to
What do you mean?
F# has a syntax different from C# and Java, you are using the Array
module to let him create an array with an initializer. Nothing strange, one language is functional while the other is imperative so these differences are indeed needed.
According to the F# language specs you can't declare something that is uninitialized (unless using specific patterns as the Option
type which are just exploits that allow you to express the uninitialized concept without really having it), that's why you have to pass an initializer for elements in the array.