maxveldink / sorbet-result

Adds T::Result as a basic, strongly-typed monad
MIT License
23 stars 2 forks source link

Add support for chaining with `#and_then` #14

Closed iMacTia closed 1 year ago

iMacTia commented 1 year ago

Summary

Add support for chaining with #and_then.

Chaining can be useful when we want to simplify a sequence of method calls that return Typed::Result and avoid to check for success? or failure? at every step. See #9 for more details and examples.

Fixes #9

iMacTia commented 1 year ago

@maxveldink thank you for your review 🙏 I've addressed all points and updated the CHANGELOG.

This should now be ready for a final review 🙌