F # how to adjust array length in deldaration

I can do (array x: int)

But I need only 300 array elements, so how am I (x: int [300])?

Unable to find such information via msdn)

@Marcelo Cantos There is no reason, but I always used dimensional arrays. Why not?

+3
source share
1 answer

No . The F # type system does not support types such as "an array of size 300", and even if it was done, using the type system to check for potential array overflows at compile time is too impractical to implement.

, " 300 " F # , , (map iter, ). , 300 , , ?

" 300 ", , , . , , 300- (, map 300 create, length 300). , , , F # 300- , .

+3

Source: https://habr.com/ru/post/1778951/


All Articles