Created
February 25, 2012 03:04
-
-
Save otf/1905589 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Maybe関数() | |
{ | |
var safeParse = FuncUtil.Maybe<string, int>(int.Parse); | |
Assert.That(safeParse("123"), Is.EqualTo(new Option<int>(123))); | |
Assert.That(safeParse("ababa"), Is.EqualTo(Option<int>.None)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment