ZipperEx.List (ZipperEx v0.1.0)
A zipper implementation for nested lists.
Examples
iex> zipper = ZipperEx.List.new([1, [2, [3, 4], 5], 6])
iex> {_, acc} = ZipperEx.traverse(zipper, [], fn z, acc ->
...> {z, [ZipperEx.node(z) | acc]}
...> end)
...> Enum.reverse(acc)
[
[1, [2, [3, 4], 5], 6],
1,
[2, [3, 4], 5],
2,
[3, 4],
3,
4,
5,
6
]
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
.