package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Same semantics as 'a Array.t, except it's guaranteed that the representation array is not tagged with Double_array_tag, the tag for float arrays. This means it's safer to use in the presence of Obj.magic, but it's slower than normal Array if you use it with floats.

It can often be faster than Array if you use it with non-floats.

type 'a t

See Core.Array for comments.

include sig ... end
val bin_read_t : 'a Bin_prot.Read.reader -> 'a t Bin_prot.Read.reader
val __bin_read_t__ : 'a Bin_prot.Read.reader -> (Base.Int.t -> 'a t) Bin_prot.Read.reader
val bin_size_t : 'a Bin_prot.Size.sizer -> 'a t Bin_prot.Size.sizer
val bin_write_t : 'a Bin_prot.Write.writer -> 'a t Bin_prot.Write.writer
val bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val empty : _ t
val create : len:Base.Int.t -> 'a -> 'a t
val init : Base.Int.t -> f:(Base.Int.t -> 'a) -> 'a t
val length : 'a t -> Base.Int.t
val get : 'a t -> Base.Int.t -> 'a
val unsafe_get : 'a t -> Base.Int.t -> 'a
val set : 'a t -> Base.Int.t -> 'a -> Base.Unit.t
val unsafe_set : 'a t -> Base.Int.t -> 'a -> Base.Unit.t
val map : 'a t -> f:('a -> 'b) -> 'b t
val iter : 'a t -> f:('a -> Base.Unit.t) -> Base.Unit.t
val of_array : 'a Base.Array.t -> 'a t
val to_array : 'a t -> 'a Base.Array.t

to_array t returns a fresh array with the same contents as t, rather than returning a reference to the underlying array.

val of_list : 'a Base.List.t -> 'a t
val to_list : 'a t -> 'a Base.List.t
include Blit.S1 with type 'a t := 'a t
val blit : ('a t, 'a t) Base.Blit_intf.blit
val blito : ('a t, 'a t) Base.Blit_intf.blito
val unsafe_blit : ('a t, 'a t) Base.Blit_intf.blit
val sub : ('a t, 'a t) Base.Blit_intf.sub
val subo : ('a t, 'a t) Base.Blit_intf.subo
val copy : 'a t -> 'a t
OCaml

Innovation. Community. Security.