Yex.ArrayPrelim (y_ex v0.8.0)

View Source

A preliminary array. It can be used to early initialize the contents of a Array.

Examples

iex> doc = Yex.Doc.new()
iex> map = Yex.Doc.get_map(doc, "map")
iex> Yex.Map.set(map, "key", Yex.ArrayPrelim.from(["Hello", "World"]))
iex> {:ok, %Yex.Array{} = array} = Yex.Map.fetch(map, "key")
iex> Yex.Array.fetch(array, 1)
{:ok, "World"}

Summary

Types

t()

@type t() :: %Yex.ArrayPrelim{list: list()}

Functions

from(enumerable)

@spec from(Enumerable.t()) :: t()