package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.8.1.tar.gz
md5=d84e09c5d0abc501aa17cd502e31a038
sha512=8b832f4ada6035e80d81be0cfb7bdffb695ec67d465ed6097a144019e2b8a8f909095e78019c3da2d8181cc3cd730cd48f7519e87d3162442562103b7f36aabb

doc/containers.data/CCRingBuffer/MakeFromArray/argument-1-A/index.html

Parameter MakeFromArray.A

type elt

The element type

type t

The type of an array instance

val dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
val create : int -> t

Make an array of the given size, filled with dummy elements.

val length : t -> int

length t gets the total number of elements currently in t.

val get : t -> int -> elt

get t i gets the element at position i.

val set : t -> int -> elt -> unit

set t i e sets the element at position i to e.

val sub : t -> int -> int -> t

sub t i len gets the sub-array of t from position i to i + len.

val copy : t -> t

copy t makes a fresh copy of the array t.

val blit : t -> int -> t -> int -> int -> unit

blit t s arr i len copies len elements from arr starting at i to position s from t.

val iter : (elt -> unit) -> t -> unit

iter f t iterates over the array t invoking f with the current element, in array order.

OCaml

Innovation. Community. Security.