'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.
include sig ... endval t_of_sexp : (Sexplib.Sexp.t ‑> 'a) ‑> Sexplib.Sexp.t ‑> 'a tval sexp_of_t : ('a ‑> Sexplib.Sexp.t) ‑> 'a t ‑> Sexplib.Sexp.tval bin_t : 'a Bin_prot.Type_class.t ‑> 'a t Bin_prot.Type_class.tval bin_read_t : 'a Bin_prot.Read.reader ‑> 'a t Bin_prot.Read.readerval __bin_read_t__ : 'a Bin_prot.Read.reader ‑> (Core_kernel__.Import.int ‑> 'a t) Bin_prot.Read.readerval bin_reader_t : 'a Bin_prot.Type_class.reader ‑> 'a t Bin_prot.Type_class.readerval bin_size_t : 'a Bin_prot.Size.sizer ‑> 'a t Bin_prot.Size.sizerval bin_write_t : 'a Bin_prot.Write.writer ‑> 'a t Bin_prot.Write.writerval bin_writer_t : 'a Bin_prot.Type_class.writer ‑> 'a t Bin_prot.Type_class.writerval bin_shape_t : Bin_prot.Shape.t ‑> Bin_prot.Shape.tval empty : _ tval init_some : Core_kernel__.Import.int ‑> f:(Core_kernel__.Import.int ‑> 'a) ‑> 'a tval init : Core_kernel__.Import.int ‑> f:(Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.option) ‑> 'a tval length : _ t ‑> Core_kernel__.Import.intval get : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.optionget t i returns the element number i of array t, raising if i is outside the
range 0 to length t - 1.
val is_none : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.boolis_none t i = Option.is_none (get t i)
val is_some : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.boolis_some t i = Option.is_some (get t i)
These can cause arbitrary behavior when used for an out-of-bounds array access.
val unsafe_get : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.optionval unsafe_get_some_exn : 'a t ‑> Core_kernel__.Import.int ‑> 'aval unsafe_is_some : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.boolval set : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.option ‑> Core_kernel__.Import.unitset 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.
val set_some : 'a t ‑> Core_kernel__.Import.int ‑> 'a ‑> Core_kernel__.Import.unitval set_none : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.unitUnsafe versions of set*. Can cause arbitrary behaviour when used for an
out-of-bounds array access.
val unsafe_set : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.option ‑> Core_kernel__.Import.unitval unsafe_set_some : 'a t ‑> Core_kernel__.Import.int ‑> 'a ‑> Core_kernel__.Import.unitval unsafe_set_none : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.unitinclude Blit.S1 with type a t := a tval blit : ('a t, 'a t) Base.Blit_intf.blitval blito : ('a t, 'a t) Base.Blit_intf.blitoval unsafe_blit : ('a t, 'a t) Base.Blit_intf.blitval sub : ('a t, 'a t) Base.Blit_intf.subval subo : ('a t, 'a t) Base.Blit_intf.subo