FunSharp.Common/UpdateExtensions.cs
//--------------------------------------------------
/// <summary>
/// Converts <paramref name="update" /> to an
/// <see cref="Either{TLeft,TRight}"/>, wrapping
/// either the wrapped value or <paramref name="leftValue" />.
/// </summary>
Converts  to an
, wrapping
either the wrapped value or .
Converts to an wrapping either the wrapped value or .
public static Either<TLeft, TRight> ToEitherRight<TLeft, TRight>(
            [NotNull] this Update<TRight> update,
            [NotNull] TLeft leftValue)
        {
            if (update is null) throw new ArgumentNullException(nameof(update));
            if (leftValue == null) throw new ArgumentNullException(nameof(leftValue));
            return update.ToOption().ToEitherRight(leftValue);
        }
public static Either < TLeft , TRight > ToEitherRight < TLeft , TRight > ( [ NotNull ] this Update < TRight > update , [ NotNull ] TLeft leftValue ) { if ( update is null ) throw new ArgumentNullException ( nameof ( update ) ) ; if ( leftValue == null ) throw new ArgumentNullException ( nameof ( leftValue ) ) ; return update . ToOption ( ) . ToEitherRight ( leftValue ) ; }
Converts  to an
, wrapping
either the wrapped value or .
Converts to an wrapping either the wrapped value or .
this
[NotNull]
TLeft
[NotNull]