effect-tree - v1.0.36
    Preparing search index...

    Interface Zipper<A>

    A zipper encodes a location with a tree, allowing for efficient navigation

    interface Zipper<A> {
        focus: Tree<A>;
        lefts: Tree<A>[];
        levels: ZipperLevel<A>[];
        parent: Option<A>;
        rights: Tree<A>[];
    }

    Type Parameters

    • A

      The underlying type of the tree. and update of immutable trees.

    Hierarchy (View Summary)

    Index

    Properties

    focus: Tree<A>

    Tree node that is the current focus.

    lefts: Tree<A>[]

    All children of the parent that are to the left of the focus node.

    levels: ZipperLevel<A>[]

    Everything required to rebuild all levels of the tree above this one. At the root level of a tree this array will be empty, when focused on any of the children of the root node it will hold a single level, and so on. The number of levels found is the depth of the zipper.

    parent: Option<A>

    Parent node value of the focus node at the level we are encoding. All nodes have a parent except the root node.

    rights: Tree<A>[]

    All children of the parent that are to the right of the focus node.