polyadic / funcky

Funcky is a Functional Library for C#
https://polyadic.github.io/funcky
Apache License 2.0
19 stars 3 forks source link

Add missing `OrElse` and `GetOrElse` methods to `Result` and `Either` #737

Closed bash closed 1 year ago

bash commented 1 year ago

I noticed that not all of our alternative monads have the same OrElse and GetOrElse methods while trying to generalize the match analyzer in #736.

Some of these overloads are potentially dangerous as they discard the error state's value. To be fair we already have one of those overloads for Either