Base.Option_arraySource'a Option_array.t is a compact representation of 'a option array: it avoids allocating heap objects representing Some x, usually representing them with x instead. It uses a special representation for None that's guaranteed to never collide with any representation of Some x.
get t i returns the element number i of array t, raising if i is outside the range 0 to length t - 1.
These can cause arbitrary behavior when used for an out-of-bounds array access.
unsafe_get_some_exn t i is unsafe because it does not bounds check i. It does, however check whether the value at index i is none or some, and raises if it is none.
unsafe_get_some_assuming_some t i is unsafe both because it does not bounds check i and because it does not check whether the value at index i is none or some, assuming that it is some.
set t i x modifies array t in place, replacing element number i with x, raising if i is outside the range 0 to length t - 1.
Unsafe versions of set*. Can cause arbitrary behaviour when used for an out-of-bounds array access.