Return the current maybe if it has a value that matches the predicate, else return an empty
function filter(predicate) {
    return flatMap(value => predicate(value) ? maybe_1.just(value) : maybe_1.nothing());
}