• Folds an [Either] monad by computing the left callback, if the monad is left-handed or the right callback if a right-handed.

    Type Parameters

    • L

    • R

    • F

    Parameters

    • value: Either<L, R>

      the monad value to fold

    • left: ((l) => F)

      callback for folding the left-hand

        • (l): F
        • Parameters

          • l: L

          Returns F

    • right: ((r) => F)

      callback for folding the right-hnd

        • (r): F
        • Parameters

          • r: R

          Returns F

    Returns F

    the folded value based on the computed callbacks.

Generated using TypeDoc