XEts.foldl
You're seeing just the function
foldl
, go back to XEts module for more information.
Link to this function
foldl(tab, acc, fun)
Specs
Fold left over the table.
Examples
iex> %{tab: tab} = XEts.new(:table) |> XEts.insert(y: 1, x: 2)
iex> XEts.foldl(tab, [], fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x: 4, y: 2]
Link to this function
foldl(tab, acc, meta, fun)
Specs
Fold left over the table given metadata.
Examples
iex> tab = XEts.new(:table) |> XEts.insert(y: 1, x: 2)
iex> XEts.foldl(tab, [], XEts.get_meta(tab), fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x: 4, y: 2]
iex> %{tab: tab} = XEts.new(:table) |> XEts.insert(y: 1, x: 2)
iex> XEts.foldl(tab, [], XEts.get_meta(tab), fn {k, v}, acc -> [{k, v * 2} | acc] end)
[x: 4, y: 2]