rjw-genes/Source/Common/Either.cs

28 lines
525 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RJW_Genes
{
public class Either<TL, TR>
{
public readonly TL left;
public readonly TR right;
public readonly bool isLeft;
public Either(TL left)
{
this.left = left;
this.isLeft = true;
}
public Either(TR right)
{
this.right = right;
this.isLeft = false;
}
}
}