FunSharp.Common/EitherExtensions.cs
//--------------------------------------------------
/// <summary>
/// Discards the left value and converts <paramref name="either" />
/// to an <see cref="Option{T}"/>.
/// </summary>
Discards the left value and converts
to an .
Discards the left value and converts to an .
[NotNull]
        public static Option<TRight> ToRightOption<TLeft, TRight>([NotNull] this Either<TLeft, TRight> either)
        {
            if (either is null) throw new ArgumentNullException(nameof(either));
            return either.Match(_ => Option<TRight>.None, Option.Some);
        }
[ NotNull ] public static Option < TRight > ToRightOption < TLeft , TRight > ( [ NotNull ] this Either < TLeft , TRight > either ) { if ( either is null ) throw new ArgumentNullException ( nameof ( either ) ) ; return either . Match ( _ => Option < TRight > . None , Option . Some ) ; }
Discards the left value and converts
to an .
Discards the left value and converts to an .
this
[NotNull]