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

    Function getValue

    • Get the value of the tree node under focus.

      Type Parameters

      • A

        Underlying tree type.

      Parameters

      Returns A

      Value of the focus node.

      import {Zipper, from, of} from 'effect-tree'
      import {pipe} from 'effect'

      const tree = from(1, of(2))

      const zipper = pipe(
      tree,
      Zipper.fromTree,
      Zipper.head,
      )

      expect(Zipper.getValue(zipper)).toBe(2)