Example #1
0
        public void Example3()
        {
            var actual =
                new ChurchNot(
                    new ChurchOr(
                        new ChurchFalse(),
                        new ChurchTrue()));

            Assert.False(actual.ToBool());
        }
Example #2
0
        public void Int32Example2()
        {
            var b =
                new ChurchNot(
                    new ChurchAnd(
                        new ChurchTrue(),
                        new ChurchFalse()));
            var actual = b.Accept(new ChurchBooleanVisitor <int>(42, 1337));

            Assert.Equal(42, actual);
        }