package containers-data

  1. Overview
  2. Docs
A set of advanced datatypes for containers

Install

Dune Dependency

Authors

Maintainers

Sources

containers-3.13.1.tbz
sha256=eb9b26eb2c3cf04fc5157d256eb49c43552ccb5c59c568772d70315db9669784
sha512=7f4cf5112c8047fd789c04129745dbe9783aa94390e8983f86408053b0af637e2a9cfce1559ce466b1b6ff7c01fd52d8685f5db1d1c0dda2c0aa138f90606a50

doc/containers-data/CCRingBuffer/module-type-S/Array/index.html

Module S.ArraySource

The module type of Array for this ring buffer

Sourcetype elt

The element type

Sourcetype t

The type of an array instance

Sourceval dummy : elt

A dummy element used for empty slots in the array

  • since 2.4
Sourceval create : int -> t

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

Sourceval length : t -> int

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

Sourceval get : t -> int -> elt

get t i gets the element at position i.

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

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

Sourceval sub : t -> int -> int -> t

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

Sourceval copy : t -> t

copy t makes a fresh copy of the array t.

Sourceval 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.

Sourceval 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.