You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System;namespaceCSharpFunctionalExtensions{publicstaticpartialclassMaybeExtensions{publicstaticResult<T,E>ToResult<T,E>(inthisMaybe<T> maybe,Func<E>errorFactory){if(maybe.HasNoValue)return Result.Failure<T,E>(errorFactory());return Result.Success<T,E>(maybe.GetValueOrThrow());}}}
It would avoid calling expensive error building code when maybe has a value.
The text was updated successfully, but these errors were encountered:
Would this be possible ?
It would avoid calling expensive error building code when maybe has a value.
The text was updated successfully, but these errors were encountered: