Google News
logo
F# - Interview Questions
What is Array in F#?
Arrays are mutable collections of data of the same type. It starts from index 0 and goes to n-1 where n is the length of arrays.
 
Example : 
let arr = [| 1; 2; 3; 4; 5; |]               // Creating and initializing array  
for i = 0 to arr.Length-1 do                // Traversing of array  
  printfn "%d" arr.[i]  
Advertisement