Represent a finite list by a function from indices to optional values. There must be a length for which exactly the indices are present; later indices are absent, so the representation has no holes. Prepending and removing a head shift indices, taking restricts the present domain, and dropping translates it. Functional composition can accumulate query costs, so array-like constant-time access does not follow from the representation type.

Articles by others on the same topic (0)

There are currently no matching articles.