public void Strings6() { var list = FList.New("Tom", "Dick", "Harry"); var expected = FList.New('o', 'm'); Assert.AreEqual(expected, FList.Tail(FList.Head(list))); }
public void Strings8() { var str = "Harry"; var expected = "arry"; Assert.AreEqual(expected, FList.Tail(str).ToString()); }
public void Strings2() { var list = FList.New("Tom", "Dick", "Harry"); var expected = FList.New("Dick", "Harry"); Assert.AreEqual(expected, FList.Tail(list)); }
public void Strings4() { var list = FList.AsChars("Tom"); var expected = FList.New('o', 'm'); Assert.AreEqual(expected, FList.Tail(list)); }
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); }
public void Tail1String() { var list = "12345"; var actual = FList.Tail(list); var expected = "2345"; Assert.AreEqual(expected, actual.ToString()); }
public void Tail3() { var list = FList.New(5); var actual = FList.Tail(list); var expected = FList.Empty <int>(); Assert.AreEqual(expected, actual); }
public void Tail4() { var list = FList.Empty <int>(); var actual = FList.Tail(list); }
public static string PartialFeynmanDiagram(FList <string> List) { return(FList.Length(List) == 1 ? FList.Head(List) : FList.Head(List) + " + " + PartialFeynmanDiagram(FList.Tail(List))); }