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

Link to this section Functions