• Safely extracts the value from an Either with a fallback. Use this function when you need to convert an Either<E, A> to an A, providing a default value for the Left case.

    Type Parameters

    • E
    • A

    Parameters

    • onLeft: (left: E) => A

      The value to return if the Either is Left

    Returns (either: Either<E, A>) => A

    The contained value if Right, the result of onLeft if Left