Skip to content

Add zip to Either#127

Open
Dri3xCz wants to merge 1 commit intospebbe:masterfrom
Dri3xCz:feat/either_zip
Open

Add zip to Either#127
Dri3xCz wants to merge 1 commit intospebbe:masterfrom
Dri3xCz:feat/either_zip

Conversation

@Dri3xCz
Copy link

@Dri3xCz Dri3xCz commented Feb 16, 2026

Added a zip method to Either, zip essentially "zips" two Eithers into one with a Tuple of both of their values. Since library seems to be Right-side biased I decided to not implement leftZip.

Zip should probably come out of some Monad abstraction but practically it only makes sense on Either, so I've decided for now that it is not from abstraction.

Added test coverage for this method.

If you ever come back to maintain this project, I would appreciate a response, even if it is few years from now on. 👀

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.

1 participant

Comments