package fmlib

  1. Overview
  2. Docs
Functional monadic library

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.0.tar.gz
sha256=0558665285e4d7691e5a80c90ab05a7acb86c09f03ceef6589f150f6d3574573
md5=fb61f4d6e7233cf8d1d71758e6110c1e

doc/fmlib.fmlib_std/Fmlib_std/Array/index.html

Module Fmlib_std.ArraySource

A thin wrapper around Stdlib.Array

Use Stdlib.Array in case you need functions which are not contained in this module. There are no problems using Std.Array and Stdlib.Array, because both datatypes are identical.

Sourcetype 'a t = 'a array
Sourceval length : 'a t -> int

length arr The length of the array arr.

Sourceval get : 'a t -> int -> 'a

get arr i The ith element of the array arr.

Precondition: 0 <= i && i < length [arr]

Sourceval map : ('a -> 'b) -> 'a t -> 'b t

map f arr Create a new array by mapping all elements of the original array by the function f.

Sourceval sub : 'a t -> int -> int -> 'a t

sub arr start len The subarray of arr starting at start with lenght len.

Precondition: 0 <= start <= start + len <= length arr

Sourceval push : 'a -> 'a t -> 'a t

push a arr Push element a to the rear end of the array arr.

Sourceval to_list : 'a t -> 'a list

to_list arr Convert the array arr to a list with the same content.

OCaml

Innovation. Community. Security.