예제 #1
0
 public void Associativity(Exc <int, Exception> exc)
 {
     UnitTest(
         _ => rec(func((int o) => Exc.Create <int, Exception>(__ => o / 3)), func((int o) => success <int, Exception>(o * 4))),
         r => exc.FlatMap(r.Item1).FlatMap(r.Item2).SafeEquals(exc.FlatMap(v => r.Item1(v).FlatMap(r.Item2))),
         Assert.True
         );
 }