Dry-monads

Latest version: v0.2.0

Safety actively analyzes 629599 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.3.0

Added
* Added `Eithereither` that accepts two callbacks, runs the first if it is `Right` and the second otherwise (nkondratyev)
* Added `fmap2` and `fmap3` for mapping over nested structures like `List Either` and `Either Some` (flash-gordon)
* Added `Tryvalue_or` (dsounded)
* Added the `List` monad which acts as an immutable `Array` and plays nice with other monads. A common example is a list of `Either`s (flash-gordon)
* `bind` made to work with keyword arguments as extra parameters to the block (flash-gordon)
* Added `Listtraverse` that "flips" the list with an embedded monad (flash-gordon + damncabbage)
* Added `tee` for all right-biased monads (flash-gordon)

[Compare v0.2.1...v0.3.0](https://github.com/dry-rb/dry-monads/compare/v0.2.1...v0.3.0)

0.2.1

Added

* Added `Eithertee` that is similar to `Objecttap` but executes the block only for `Right` instances (saverio-kantox)

Fixed

* `Right(nil).to_maybe` now returns `None` with a warning instead of failing (orisaka)
* `Somevalue_or` doesn't require an argument because `Nonevalue_or` doesn't require it either if a block was passed (flash-gordon)

[Compare v0.2.0...v0.2.1](https://github.com/dry-rb/dry-monads/compare/v0.2.0...v0.2.1)

0.2.0

Added

* Added `Maybeto_json` as an opt-in extension for serialization to JSON (rocknruby)
* Added `Maybevalue_or` which returns you the underlying value with a fallback in a single method call (dsounded)

[Compare v0.1.1...v0.2.0](https://github.com/dry-rb/dry-monads/compare/v0.1.1...v0.2.0)

0.1.1

Fixed

* Added explicit requires of `dry-equalizer`. This allows to safely load only specific monads (artofhuman)

[Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-monads/compare/v0.1.0...v0.1.1)

0.1.0

Added

* Support for passing extra arguments to the block in `.bind` and `.fmap` (flash-gordon)

Changed

* Dropped MRI 2.0 support (flash-gordon)

[Compare v0.0.2...v0.1.0](https://github.com/dry-rb/dry-monads/compare/v0.0.2...v0.1.0)

0.0.2

Added

* Added `Eitherto_either` so that you can rely on duck-typing when you work with different types of monads (timriley)
* Added `Maybeto_maybe` for consistency with `to_either` (flash-gordon)

[Compare v0.0.1...v0.0.2](https://github.com/dry-rb/dry-monads/compare/v0.0.1...v0.0.2)

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.