let fill ra ofs len x = if ofs < 0 || len < 0 || ofs > length ra then invalid_arg "fill" else unsafe_fill ra ofs len x