View Source Yex.ArrayPrelim (y_ex v0.7.2)
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
@type t() :: %Yex.ArrayPrelim{list: list()}
Functions
@spec from(Enumerable.t()) :: t()