effect-tree
    Preparing search index...

    Function annotateFolder

    • Converts a fold φ into one that annotates tree values: every tree node will be annotated with the intermediate value of the fold at the node.

      For example, to convert the descendantCount fold, that folds a tree into a tree total descendant count to one that annotates each node with its node total descendant count:

      const annotated = pipe(
      tree(42, [leaf(43)]),
      self, treeCata(annotateFolder(folds.descendantCount))),
      )

      Type Parameters

      • A
      • B

      Parameters

      Returns TreeFolder<A, Tree<[A, B]>>