I have a function where I add some elements into an array in the following way:

```
let mutable result = Array.CreateInstance(typeof<int>, arrayA.Length + arrayB.Length)
....
result.SetValue(arrayA.[iidx], kidx)
....

```

This works, at least in my eyes(just started days ago with F# ...)

The problem is when I call the function and the result should be int[] and it returns an Array. If I am not wrong, obviously because Array.CreateInstance creates an Array, but I thought Array will be 'compatible' with int[] in my case.

```
This expression was expected to have type
  int[]
but here has type
  Array

```

How could I cast Array to int[]? Or what should be the best approach for this kind of work with an int[] where I need to edit some specific indexes before returning it.