Is there a clear description of what “contract” `copy(::AbstractArray)`

should implement? The docs are not very precise. We have the following examples:

```
julia> copy(1:6) # just returns the same immutable type
1:6
julia> copy([1,2]) # makes a copy in memory
2-element Array{Int64,1}:
1
2
julia> copy([1,2]') # makes a copy in memory as an Adjoint
1×2 Adjoint{Int64,Array{Int64,1}}:
1 2
julia> copy([1 2; 3 4]') # makes a copy in memory as a Matrix
2×2 Array{Int64,2}:
1 3
2 4
julia> copy((1:2)') # makes a copy in memory as an Adjoint
1×2 Adjoint{Int64,Array{Int64,1}}:
1 2
```

I would guess there’s the following contract:

- If array
`A`

is immutable (`setindex!`

errors) then`C = copy(A)`

need only satisfy`C == A`

. - If array
`A`

is mutable (`setindex!`

changes the entries), then`C = copy(A)`

needs to satisfy`C == A`

,`C`

must be mutable, changing`C`

does not change any entry of`A`

.

We also have the requirement `C'b == A'b`

and `transpose(C)*b == transpose(A)*b`

for a vector `b`

, which is why the adjoints of vectors need to return an adjoint, even though adjoints of matrices do not.

If my interpretation of the contract is correct, then the last example could have returned an immutable `Adjoint(1:2)`

.

Is this a correct interpretation? I could make a PR to the doc string for `copy`

if it is.