nekronos / ResultSharp

Result type for C#
MIT License
5 stars 3 forks source link

Add UnwrapOrElse overload for computing the value from the error #1

Closed sebbert closed 3 years ago

sebbert commented 3 years ago

This PR introduces an overload to the UnwrapOrElse method, where the delegate is invoked with the error value to compute the return value.

Not sure if it's a good idea to overload based on a function type though, maybe it should have its own name?