@@ -52,16 +52,13 @@ private Either() { }
5252[ DebuggerTypeProxy ( typeof ( Either < , > . Left_ . DebugView ) ) ]
5353private sealed partial class Left_ : Either < TLeft , TRight > , IEquatable < Left_ >
5454{
55- public Left_ ( TLeft value )
56- {
57- Left = value ;
58- }
55+ public Left_ ( TLeft value ) => Left = value ;
5956
6057public override bool IsLeft => true ;
6158
6259internal override TLeft Left { get ; }
6360
64- internal override TRight Right { get { throw new InvalidOperationException ( "XXX" ) ; } }
61+ internal override TRight Right => throw new InvalidOperationException ( "XXX" ) ;
6562
6663public override Maybe < TLeft > LeftOrNone ( ) => Maybe . Of ( Left ) ;
6764
@@ -97,10 +94,7 @@ private sealed class DebugView
9794{
9895private readonly Either < TLeft , TRight > _inner ;
9996
100- public DebugView ( Either < TLeft , TRight > inner )
101- {
102- _inner = inner ;
103- }
97+ public DebugView ( Either < TLeft , TRight > inner ) => _inner = inner ;
10498
10599public TLeft Left => _inner . Left ;
106100}
@@ -112,22 +106,19 @@ public DebugView(Either<TLeft, TRight> inner)
112106[ DebuggerTypeProxy ( typeof ( Either < , > . Right_ . DebugView ) ) ]
113107private sealed partial class Right_ : Either < TLeft , TRight > , IEquatable < Right_ >
114108{
115- public Right_ ( TRight value )
116- {
117- Right = value ;
118- }
109+ public Right_ ( TRight value ) => Right = value ;
119110
120111public override bool IsLeft => false ;
121112
122- internal override TLeft Left { get { throw new InvalidOperationException ( "XXX" ) ; } }
113+ internal override TLeft Left => throw new InvalidOperationException ( "XXX" ) ;
123114
124115internal override TRight Right { get ; }
125116
126117public override Maybe < TLeft > LeftOrNone ( ) => Maybe < TLeft > . None ;
127118
128119public override Maybe < TRight > RightOrNone ( ) => Maybe . Of ( Right ) ;
129120
130- public override Either < TRight , TLeft > Swap ( ) { throw new InvalidOperationException ( "XXX" ) ; }
121+ public override Either < TRight , TLeft > Swap ( ) => throw new InvalidOperationException ( "XXX" ) ;
131122
132123public override Either < TRight , TLeft > SwapUnchecked ( ) => Either < TRight , TLeft > . OfLeft ( Right ) ;
133124
@@ -157,10 +148,7 @@ private sealed class DebugView
157148{
158149private readonly Either < TLeft , TRight > _inner ;
159150
160- public DebugView ( Either < TLeft , TRight > inner )
161- {
162- _inner = inner ;
163- }
151+ public DebugView ( Either < TLeft , TRight > inner ) => _inner = inner ;
164152
165153public TRight Right => _inner . Right ;
166154}
@@ -188,12 +176,12 @@ private partial class Left_
188176{
189177public override TLeft ToLeft ( ) => Left ;
190178
191- public override TRight ToRight ( ) { throw new InvalidCastException ( "XXX" ) ; }
179+ public override TRight ToRight ( ) => throw new InvalidCastException ( "XXX" ) ;
192180}
193181
194182private partial class Right_
195183{
196- public override TLeft ToLeft ( ) { throw new InvalidCastException ( "XXX" ) ; }
184+ public override TLeft ToLeft ( ) => throw new InvalidCastException ( "XXX" ) ;
197185
198186public override TRight ToRight ( ) => Right ;
199187}