Skip to content

Conversation

@adamkopec
Copy link
Contributor

Allows for Either and Validation usage in for-comprehensions, eg:

Either<Object, Integer> result = For(
                Either.right(1),
                Either.right(2),
                Either.right(3)
            ).yield((i1, i2, i3) -> i1 + i2 + i3);
            assertThat(result.get()).isEqualTo(6);

@adamkopec adamkopec requested a review from pivovarit as a code owner August 6, 2025 09:59
@pivovarit
Copy link
Member

This was very much lacking - thanks! I will give it a closer look and, quite likely, merge as is!

@pivovarit pivovarit added this to the v0.11.0 milestone Aug 7, 2025
@pivovarit pivovarit force-pushed the feature/For-comprehensions branch from 1b92e8e to 5711df5 Compare September 3, 2025 11:27
@pivovarit pivovarit enabled auto-merge (squash) September 3, 2025 11:29
@pivovarit pivovarit merged commit c0d67d8 into vavr-io:main Sep 6, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants