effect-tree
    Preparing search index...

    Variable treeConst

    tree: {
        curried: <A>(forest?: readonly Tree<A>[]) => (value: A) => Tree<A>;
        flipped: <A>(value: A) => (forest?: readonly Tree<A>[]) => Tree<A>;
        tupled: <A>(pair: readonly [A, (readonly Tree<A>[])?]) => Tree<A>;
        <A>(value: A, forest?: readonly Tree<A>[]): Tree<A>;
    } = ...

    Create a new Tree from a node value and a possibly empty list of child nodes. If the given forest is missing or empty a Leaf will be returned, else a Branch.

    At the curried key you will find a curried version that accepts two argument lists: the first with the optional forest and the second with the required value.

    At the flipped key you will find a flipped curried version that accepts two argument lists: the first with the required value and the second with the optional forest.

    At the tupled key you will find a tupled version that accepts the arguments as a single tuple argument of value and optional forest.

    Type Declaration

      • <A>(value: A, forest?: readonly Tree<A>[]): Tree<A>
      • Type Parameters

        • A

          Underlying tree type.

        Parameters

        • value: A

          The tree root value.

        • Optionalforest: readonly Tree<A>[]

          A possibly empty or missing list of child nodes, all of the same type as this parent node.

        Returns Tree<A>

        A new tree with the given value and possibly empty forest.

    • curried: <A>(forest?: readonly Tree<A>[]) => (value: A) => Tree<A>
    • flipped: <A>(value: A) => (forest?: readonly Tree<A>[]) => Tree<A>
    • tupled: <A>(pair: readonly [A, (readonly Tree<A>[])?]) => Tree<A>