A small companion package for dartz that extends Either with additional functional utilities.
dartz_plus was created to extend the capabilities of dartz in a clean, idiomatic way, providing common functional combinators that are missing from the core library. This helps make working with Either more expressive and concise.
zip– Combine twoEithervalues into aTuple2of theirRightvalues, returns Right or first encountered Left.zipLeft– Combine twoEithervalues into aTuple2of theirLeftvalues, returns Left or first encountered Right.
tap– Perform a side effect function on theRightvalue and return the originalEither.tapLeft– Perform a side effect on theLeftvalue and return the originalEither.tapBoth– Perform a side effect on both values and return the originalEither.
leftFlatMap– FlatMap operation on theLeftside of anEither.
Contributions of any kind are welcome!
Whether it’s:
- Bug reports
- Feature suggestions
- Pull requests
Feel free to open an issue or submit a pull request — all help is appreciated.