@SuppressWarnings("unchecked")
    public <T> Either<L, T> map(Function<R, T> function) {
        return either.isRight() ? Right(function.apply(get())) : (Either<L, T>) either;
    }
@SuppressWarnings("unchecked")
    public <T> Either<L, T> map(Function<R, T> function) {
        return either.isRight() ? Right(function.apply(get())) : (Either<L, T>) either;
    }
@ SuppressWarnings ( "unchecked" ) public < T > Either < L , T > map ( Function < R , T > function ) { return either . isRight ( ) ? Right ( function . apply ( get ( ) ) ) : ( Either < L , T > ) either ; }
If this projection contains a {@link Right} then a new {@link Right} is returned containing the value from the original {@link Right} mapped via the
provided function, else the contained Either is returned as is.

@param <T>
The type to return as the new {@link Right}
@param function
The function
@return Mapped Either
@since 1.1
If this projection contains a { @link Right } then a new { @link Right } is returned containing the value from the original { @link Right } mapped via the provided function else the contained Either is returned as is .