FirstVariable() public method

public FirstVariable ( ) : Variable
return Variable
Esempio n. 1
0
        public void FirstVariable()
        {
            List list = new List(new Variable("H"), new Variable("T"));
            var result = list.FirstVariable();

            Assert.IsNotNull(result);
            Assert.AreEqual("H", result.Name);
        }
Esempio n. 2
0
        public void FirstVariableInTail()
        {
            List list = new List(new Tuple(new object[] { new Atom("h") }), new Variable("T"));
            var result = list.FirstVariable();

            Assert.IsNotNull(result);
            Assert.AreEqual("T", result.Name);
        }
Esempio n. 3
0
        public void NoVariable()
        {
            List list = new List(1, 2);
            var result = list.FirstVariable();

            Assert.IsNull(result);
        }