示例#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)));
        }
示例#2
0
        public void Strings7()
        {
            var str      = "Harry";
            var expected = 'H';

            Assert.AreEqual(expected, FList.Head(str));
        }
示例#3
0
        public void Strings3()
        {
            var list     = FList.AsChars("Tom");
            var expected = 'T';

            Assert.AreEqual(expected, FList.Head(list));
        }
示例#4
0
        public void Strings5()
        {
            var list     = FList.New("Tom", "Dick", "Harry");
            var expected = 'T';

            Assert.AreEqual(expected, FList.Head(FList.Head(list)));
        }
示例#5
0
 public void Head1()
 {
     var list = FList.New(1, 2, 3, 4, 5);
     var actual = FList.Head(list);
     var expected = 1;
     Assert.AreEqual(expected, actual);
 }
示例#6
0
 public void Head1String()
 {
     var list = "12345";
     var actual = FList.Head(list);
     var expected = '1';
     Assert.AreEqual(expected, actual);
 }
示例#7
0
 public void Head2()
 {
     var list = FList.New(5);
     var actual = FList.Head(list);
     var expected = 5;
     Assert.AreEqual(expected, actual);
 }
示例#8
0
 public void Head3Action()
 {
     var list   = FList.Empty <int>();
     var actual = FList.Head(list);
 }
示例#9
0
        public void Strings1()
        {
            var list = FList.New("Tom", "Dick", "Harry");

            Assert.AreEqual("Tom", FList.Head(list));
        }
示例#10
0
 public static string PartialFeynmanDiagram(FList <string> List)
 {
     return(FList.Length(List) == 1 ? FList.Head(List) : FList.Head(List) + " + " + PartialFeynmanDiagram(FList.Tail(List)));
 }