XEts.foldr

You're seeing just the function foldr, go back to XEts module for more information.
Link to this function

foldr(tab, acc, fun)

Specs

foldr(t(), any(), function()) :: t()
foldr(tab(), any(), function()) :: t()

Fold right over the table.

Examples

iex> tab = XEts.new(:table) |>  XEts.insert(x: 1, y: 2)
iex> XEts.foldr(tab, [], fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x:  2, y:  4]
Link to this function

foldr(tab, acc, meta, fun)

Specs

foldr(t(), any(), meta(), function()) :: t()
foldr(tab(), any(), meta(), function()) :: t()

Fold right over the table given metadata.

Examples

iex> tab = XEts.new(:table) |>  XEts.insert(x: 1, y: 2)
iex> XEts.foldr(tab, [], XEts.get_meta(tab), fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x:  2, y:  4]

iex> %{tab: tab} = XEts.new(:table) |>  XEts.insert(x: 1, y: 2)
iex> XEts.foldr(tab, [], XEts.get_meta(tab), fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x:  2, y:  4]