src/main/java/javascalautils/Success.java
@Override
    public <R> Try<R> flatMap(ThrowableFunction1<T, Try<R>> function) {
        try {
            return function.apply(value);
        }
        catch(Throwable t) {
            return new Failure<>(t);
        }
    }
@Override
    public <R> Try<R> flatMap(ThrowableFunction1<T, Try<R>> function) {
        try {
            return function.apply(value);
        }
        catch(Throwable t) {
            return new Failure<>(t);
        }
    }
@ Override public < R > Try < R > flatMap ( ThrowableFunction1 < T , Try < R > > function ) { try { return function . apply ( value ) ; } catch ( Throwable t ) { return new Failure <> ( t ) ; } }
Applies the value to the function and returns the {@link Try} generated by the function.

@since 1.2
Applies the value to the function and returns the { @link Try } generated by the function .