let to_array ({ ar = ar } as ra) =
    Array.init (length ra) (fun i -> unsafe_get_ar ar i)