dist/maybe/operators.js
/** Return a maybe with the current value, if any, mapped to a new Maybe */
Return a maybe with the current value, if any, mapped to a new Maybe
Return a maybe with the current value if any mapped to a new Maybe
function flatMap(mapper) {
    return function (maybe) {
        for (const value of maybe) {
            return mapper(value);
        }
        return maybe_1.nothing();
    };
}
function flatMap ( mapper ) { return function ( maybe ) { for ( const value of maybe ) { return mapper ( value ) ; } return maybe_1 . nothing ( ) ; } ; }
Return a maybe with the current value, if any, mapped to a new Maybe
Return a maybe with the current value if any mapped to a new Maybe