public void ReduceConstructorExpression()
        {
            var fn = new ConstructorFunction(new MapType(IntegerType.Instance, new MapType(IntegerType.Instance, IntegerType.Instance)));

            var expr = new ConstructorFunctionalExpression(fn, new IExpression[] { new IntegerExpression(1), new IntegerExpression(2) });

            Assert.AreSame(expr, expr.Reduce());
        }
        public void Match()
        {
            var fn = new ConstructorFunction(new MapType(IntegerType.Instance, new MapType(IntegerType.Instance, IntegerType.Instance)));

            var expr = new ConstructorFunctionalExpression(fn, new IExpression[] { new IntegerExpression(1), new IntegerExpression(2) });
            var expr2 = new ConstructorFunctionalExpression(fn, new IExpression[] { new IntegerExpression(1), new IntegerExpression(2) });
            var expr3 = new ConstructorFunctionalExpression(fn, new IExpression[] { new IntegerExpression(1), new IntegerExpression(3) });

            Assert.IsTrue(expr.Match(expr2, null));
            Assert.IsFalse(expr.Match(expr3, null));
        }