FirstVariable() public méthode

public FirstVariable ( ) : Variable
Résultat Variable
Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
        public void NoVariable()
        {
            List list = new List(1, 2);
            var result = list.FirstVariable();

            Assert.IsNull(result);
        }