Arrays
Shoot a ray of arrays
val numbers = [1,2,3,4,5,6,7,8,9,10] (* The compiler can deduce the size here*)
fun head(x: [Int; 10]): Int => x.[0] (* Notice how you specified the type of the array *)Last updated
Shoot a ray of arrays
val numbers = [1,2,3,4,5,6,7,8,9,10] (* The compiler can deduce the size here*)
fun head(x: [Int; 10]): Int => x.[0] (* Notice how you specified the type of the array *)Last updated