def test_valid(self, d: AsMaybe): m = Maybe(1) assert m.as_maybe(d).is_something()
def test_invalid(self, d: AsMaybe): m = Maybe(NotImplemented) assert m.as_maybe(d).is_nothing()
def test_empty(self, d: AsMaybe): m = Maybe(EMPTY) assert m.as_maybe(d).is_nothing()