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 type_name : ('elt, 'arr) arraylike -> type_name

type_name a is the type name of a.

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

elt a is the representation of the elements of a.

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

with_meta meta a is a with meta meta.

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.