dartz_extensions 0.1.0
dartz_extensions: ^0.1.0 copied to clipboard
Extensions for the dartz package.
dartz_extensions #
A small companion package for dartz that extends Either with additional functional utilities.
Motivation #
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.
Features #
Zip combinators #
zip– Combine twoEithervalues into aTuple2of theirRightvalues, returns RightzipLeft– Combine twoEithervalues into aTuple2of theirLeftvalues, returns Left
Side-effect combinators #
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.
Left-side mapping #
leftFlatMap– FlatMap operation on theLeftside of anEither.
Contributing #
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.