Open Odonno opened 6 years ago
Could not agree more, this looks a lot like Vladimir Khorikov's Result object in his functional courses.
Interesting. I hadn't really thought of using ValueOrError
like that, but it does make sense. So I'll add support for ValueOrError<TValue, TError>
, I think.
Need to document this new type in the wiki now that v4 is released.
Is it possible to use
ValueOrError<TValue>
or evenValueOrError<TValue, TError>
?I mean, what if you want to get a value of a POCO object (as value) and return an Exception (as error)?