let split_at t ~index = let l = A.length t in if index < 0 then (A.empty, t) else if index >= l then (t, A.empty) else (A.sub_exn t ~index:0 ~length:index), (A.sub_exn t ~index:index ~length:(l - index))