dist/maybe/operators.js
/** Extract a value from the maybe, either the value of the maybe or the default value provided if the maybe is empty */
Extract a value from the maybe, either the value of the maybe or the default value provided if the maybe is empty
Extract a value from the maybe either the value of the maybe or the default value provided if the maybe is empty
function defaultIfEmpty(defaultValue) {
    return function (maybe) {
        for (const value of maybe) {
            return value;
        }
        return defaultValue;
    };
}
function defaultIfEmpty ( defaultValue ) { return function ( maybe ) { for ( const value of maybe ) { return value ; } return defaultValue ; } ; }
Extract a value from the maybe, either the value of the maybe or the default value provided if the maybe is empty
Extract a value from the maybe either the value of the maybe or the default value provided if the maybe is empty