Exemplo n.º 1
0
        public void MAppendOfMEmptyAndXIsX()
        {
            // mempty <> x = x
            var x      = new ListMonoid <int>(1, 2, 3);
            var actual = ListMonoid.MEmpty <int>().MAppend(x);

            Assert.That(actual.List, Is.EqualTo(x.List));
        }
Exemplo n.º 2
0
        public void MAppendOfXAndMEmptyIsX()
        {
            // x <> mempty = x
            var x      = new ListMonoid <int>(1, 2, 3);
            var actual = x.MAppend(ListMonoid.MEmpty <int>());

            Assert.That(actual.List, Is.EqualTo(x.List));
        }
Exemplo n.º 3
0
        public void MEmpty()
        {
            var actual = ListMonoid.MEmpty <int>();

            Assert.That(actual.List, Is.Empty);
        }