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

Link to this section Functions

Link to this function

append_child(zipper, child)

View Source

See ZipperEx.append_child/2.

See ZipperEx.down/1.

See ZipperEx.end?/1.

See ZipperEx.find/2.

Link to this function

insert_child(zipper, child)

View Source

See ZipperEx.insert_child/2.

Link to this function

insert_left(zipper, child)

View Source

See ZipperEx.insert_left/2.

Link to this function

insert_right(zipper, child)

View Source

See ZipperEx.insert_right/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.

Link to this function

traverse(zipper, acc, fun)

View Source

See ZipperEx.traverse/3.

Link to this function

traverse_while(zipper, fun)

View Source

See ZipperEx.traverse_while/2.

Link to this function

traverse_while(zipper, acc, fun)

View Source

See ZipperEx.traverse_while/3.

See ZipperEx.up/1.

See ZipperEx.update/2.