Пример #1
0
        public void FuncTest()
        {
            int[] expected = { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 };
            var   fibs     = ToIterator(FibSupplier.Func()).Take(expected.Length);

            Assert.Equal(expected, fibs);
        }
Пример #2
0
        public static void Main(string[] args)
        {
            Print(10, FibSupplier.Stream().ToFunc());
            Print(20, FibSupplier.Func());

            Print(10, PrimesSupplier.Stream().ToFunc());
            Print(20, PrimesSupplier.Func());
        }
Пример #3
0
 public void StreamTest()
 {
     int[] expected = { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 };
     Assert.Equal(expected, FibSupplier.Stream().Take(expected.Length));
 }