ZipperEx.Map (ZipperEx v0.1.0)
A zipper implementation for nested maps.
Examples
iex> zipper = ZipperEx.Map.new(%{a: 1, b: %{c: 2, d: 3}})
iex> {_, acc} = ZipperEx.traverse(zipper, [], fn z, acc ->
...> {z, [ZipperEx.node(z) | acc]}
...> end)
...> Enum.reverse(acc)
[
%{a: 1, b: %{c: 2, d: 3}},
{:a, 1},
{:b, %{c: 2, d: 3}},
{:c, 2},
{:d, 3}
]
Link to this section Summary
Functions
See ZipperEx.up/1
.
Link to this section Functions
Link to this function
append_child(zipper, child)
Link to this function
down(zipper)
See ZipperEx.down/1
.
Link to this function
end?(zipper)
See ZipperEx.end?/1
.
Link to this function
find(zipper, fun)
See ZipperEx.find/2
.
Link to this function
insert_child(zipper, child)
Link to this function
insert_left(zipper, child)
Link to this function
insert_right(zipper, child)
Link to this function
left(zipper)
See ZipperEx.left/1
.
Link to this function
leftmost(zipper)
See ZipperEx.leftmost/1
.
Link to this function
map(zipper, fun)
See ZipperEx.map/2
.
Link to this function
new(tree)
Link to this function
next(zipper)
See ZipperEx.next/1
.
Link to this function
node(zipper)
See ZipperEx.node/1
.
Link to this function
prev(zipper)
See ZipperEx.prev/1
.
Link to this function
remove(zipper)
See ZipperEx.remove/1
.
Link to this function
replace(zipper, node)
See ZipperEx.replace/2
.
Link to this function
right(zipper)
See ZipperEx.right/1
.
Link to this function
rightmost(zipper)
See ZipperEx.rightmost/1
.
Link to this function
root(zipper)
See ZipperEx.root/1
.
Link to this function
top(zipper)
See ZipperEx.top/1
.
Link to this function
traverse(zipper, fun)
See ZipperEx.traverse/2
.
Link to this function
traverse(zipper, acc, fun)
See ZipperEx.traverse/3
.
Link to this function
up(zipper)
See ZipperEx.up/1
.