Skip to content

Pr#1

Open
odalet wants to merge 2 commits into
nealford:masterfrom
odalet:pr
Open

Pr#1
odalet wants to merge 2 commits into
nealford:masterfrom
odalet:pr

Conversation

@odalet

@odalet odalet commented Dec 8, 2013

Copy link
Copy Markdown

Hi, I contribute here a C# port of your Either class (from Java).

Notes: I modified a bit the implementation of Either:

  • The IsLeft/IsRight properties are backed by a boolean instead of comparing left/right values with 'empty' (default(T). This allows, for example, having 0 a valid right value for a Either<Exception, int> instance.
  • I added InvalidOperationException guards when accessing Left and Right properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant