namespace SJK.Functional; public sealed class Right : IEither { private readonly TRight _value; public Right(TRight value){ this._value = value; } public (TLeft?, TRight?) Deconstruct()=>(default(TLeft),_value); public IEither MapLeft(Func mapping) => new Right(this._value); public IEither MapRight(Func mapping) => new Right(mapping(this._value)); public TLeft Reduce(Func mapping)=> mapping(this._value); public override string ToString() { return $"Right<{typeof(TRight).Name}> with Value {_value}"; } public TResult Match(Func left, Func right) { return right(_value); } public void Match(Action left, Action right) { right(_value); } public IEither Bind< T2>(Func> value) { return value(_value); } public bool IsRight() => false; }