Beispiel #1
0
        public void Int32Example1()
        {
            var b      = new ChurchOr(new ChurchFalse(), new ChurchFalse());
            var actual = b.Accept(new ChurchBooleanVisitor <int>(42, 1337));

            Assert.Equal(1337, actual);
        }
Beispiel #2
0
        public void StringExample1()
        {
            var b      = new ChurchOr(new ChurchTrue(), new ChurchFalse());
            var actual =
                b.Accept(new ChurchBooleanVisitor <string>("foo", "bar"));

            Assert.Equal("foo", actual);
        }