Beispiel #1
0
        public void Strings6()
        {
            var list     = FList.New("Tom", "Dick", "Harry");
            var expected = FList.New('o', 'm');

            Assert.AreEqual(expected, FList.Tail(FList.Head(list)));
        }
Beispiel #2
0
        public void Strings8()
        {
            var str      = "Harry";
            var expected = "arry";

            Assert.AreEqual(expected, FList.Tail(str).ToString());
        }
Beispiel #3
0
        public void Strings2()
        {
            var list     = FList.New("Tom", "Dick", "Harry");
            var expected = FList.New("Dick", "Harry");

            Assert.AreEqual(expected, FList.Tail(list));
        }
Beispiel #4
0
        public void Strings4()
        {
            var list     = FList.AsChars("Tom");
            var expected = FList.New('o', 'm');

            Assert.AreEqual(expected, FList.Tail(list));
        }
Beispiel #5
0
        public void Tail1()
        {
            var list     = FList.New(1, 2, 3, 4, 5);
            var actual   = FList.Tail(list);
            var expected = FList.New(2, 3, 4, 5);

            Assert.AreEqual(expected, actual);
        }
Beispiel #6
0
        public void Tail1String()
        {
            var list     = "12345";
            var actual   = FList.Tail(list);
            var expected = "2345";

            Assert.AreEqual(expected, actual.ToString());
        }
Beispiel #7
0
        public void Tail3()
        {
            var list     = FList.New(5);
            var actual   = FList.Tail(list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Beispiel #8
0
 public void Tail4()
 {
     var list   = FList.Empty <int>();
     var actual = FList.Tail(list);
 }
Beispiel #9
0
 public static string PartialFeynmanDiagram(FList <string> List)
 {
     return(FList.Length(List) == 1 ? FList.Head(List) : FList.Head(List) + " + " + PartialFeynmanDiagram(FList.Tail(List)));
 }