Module Gist.Arraylike

Operating on arraylike types.

Arraylikes

type 'a gist := 'a t
type ('elt, 'arr) t = ('elt, 'arr) arraylike

The type for representing arraylike types of type 'arr with elements of type 'elt.

val meta : ('elt, 'arr) arraylike -> 'arr Meta.t

meta a is the metadata of a.

val name : ('elt, 'arr) arraylike -> string

name a is the name of a.

val elt : ('elt, 'arr) t -> 'elt gist

elt a is the representation of the elements of a.

Generalizing to array modules

val to_array_module : ('elt, 'arr) arraylike -> ('elt, 'arr) array_module

to_array_module a is an array module for a. Note that if a is String, the ARRAY.set function raises Invalid_argument in the resulting module.