ZipperEx.List (ZipperEx v0.2.0) View Source
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
See ZipperEx.down/1.
See ZipperEx.end?/1.
See ZipperEx.find/2.
See ZipperEx.left/1.
See ZipperEx.leftmost/1.
See ZipperEx.map/2.
See ZipperEx.next/1.
See ZipperEx.node/1.
See ZipperEx.prev/1.
See ZipperEx.remove/1.
See ZipperEx.replace/2.
See ZipperEx.right/1.
See ZipperEx.rightmost/1.
See ZipperEx.root/1.
See ZipperEx.top/1.
See ZipperEx.traverse/2.
See ZipperEx.traverse/3.
See ZipperEx.up/1.
See ZipperEx.update/2.