wechat/array

Allocation-conscious conversion at JavaScript array boundaries. These functions preserve element identity and never mutate the input list.

Values

pub fn from_list(items: List(a)) -> array.Array(a)

Create a fresh native array in list order without using the List iterator.

pub fn from_reversed_list(items: List(a)) -> array.Array(a)

Create a fresh native array in reverse list order. Useful for append-only Gleam models that prepend observations and emit them chronologically.

Search Document