-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why withDefaultResult is mandatory? #187
Comments
withDefault is not mandatory. Having a result was always optional. Do you think it should behave differently? |
Maybe I misunderstood something, but I get an error
when I try to compile this example without commenting out the line
I don't need the default. How to get rid of it? |
Ah, so if you have a result, then yes, you need to specify a default value. However, there is no requirement for you to have a result. So, perhaps it was I who misunderstood. But am I correct in understanding now that you want to have a result, but no default result? Presently, that is not something that's possible without a little trickery, like |
Yes, I want to have an empty Optional if no rules executed and no default defined, otherwise Optional of result or a default value if it was defined. |
It would be convenient to get an empty Optional if no rules were executed.
The text was updated successfully, but these errors were encountered: