예제 #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());
        }