• Maps the right value if present with the mapping function.

    Example

    map(right(1), num => num + 1) === right(2)
    map(left("error"), num => num + 1) === left("error")

    Type Parameters

    • L

    • R

    • B

    Parameters

    • f: ((a: R) => B)
        • (a: R): B
        • Parameters

          • a: R

          Returns B

    • either: Either<L, R>

    Returns Either<L, B>

Generated using TypeDoc