let shiftRight1 arr =
match arr with
| [| |]
| [| _ |] -> arr
| _ ->
let lastIndex = (Array.length arr) - 1
let last = arr.[lastIndex]
System.Array.Copy(arr, 0, arr, 1, lastIndex)
arr.[0] <- last
arr
[|1;2;3;4|]
|> shiftRight1
|> printfn "%A"