src/main/java/javascalautils/Some.java
@Override
    public <R> Option<R> flatMap(ThrowableFunction1<T, Option<R>> function) {
        try {
            return function.apply(value);
        }
        catch (Throwable ex) {
            throw new BrokenFunctionException("Caught exception while applying function", ex);
        }
    }
@Override
    public <R> Option<R> flatMap(ThrowableFunction1<T, Option<R>> function) {
        try {
            return function.apply(value);
        }
        catch (Throwable ex) {
            throw new BrokenFunctionException("Caught exception while applying function", ex);
        }
    }
@ Override public < R > Option < R > flatMap ( ThrowableFunction1 < T , Option < R > > function ) { try { return function . apply ( value ) ; } catch ( Throwable ex ) { throw new BrokenFunctionException ( "Caught exception while applying function" , ex ) ; } }
Returns an Option consisting of the result of applying the given function to the current value.

@since 1.2
Returns an Option consisting of the result of applying the given function to the current value .