array
array
Module
array
Module summary
Functional, extendible arrays.
Description
Functional, extendible arrays. Arrays can have fixed size, or can grow automatically as needed. A default value is used for entries that have not been explicitly set.
Arrays uses zero based indexing. This is a deliberate design choice and differs from other erlang datastructures, e.g. tuples.
Unless specified by the user when the array is created, the default value is the atom undefined
. There is no difference between an unset entry and an entry which has been explicitly set to the same value as the default one (cf. reset/2
). If you need to differentiate between unset and set entries, you must make sure that the default value cannot be confused with the values of set entries.
The array never shrinks automatically