Created
February 25, 2012 04:38
-
-
Save otf/1906490 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 Eitherに関数を適用_途中で失敗する関数() | |
{ | |
var safeParse = FuncUtil.Either<string, int>(int.Parse); | |
var m = (Either<Exception, string>)Either.Right("hoge"); | |
var result = from result1 in m | |
from result2 in safeParse(result1) | |
select result2; | |
Assert.That(result.Match(l => true, r => false), Is.True); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment