Skip to content
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

Either.when(), as a convenience for Option.when().toEither() #2715

Open
jbrains opened this issue Mar 13, 2022 · 0 comments
Open

Either.when(), as a convenience for Option.when().toEither() #2715

jbrains opened this issue Mar 13, 2022 · 0 comments

Comments

@jbrains
Copy link
Contributor

jbrains commented Mar 13, 2022

I like Option.when(). I would also like Either.when(). Please consider it. I would add it myself, but I don't have the energy right now. I might try later.

Either.when(boolean condition, T ifTrue, Supplier<? extends R> ifFalse) { return Option.when(condition, ifTrue).toEither(ifFalse); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant