예제 #1
0
        public void TestTee()
        {
            var p1 = Process.Apply(1, 2, 3, 4, 5).Select(n => n.ToString());
            var p2 = Process.Apply("a", "b", "c", "d", "e");
            var p3 = Process.Interleave(p1, p2);
            var p4 = Process.Sink <string>(s => Console.WriteLine(s));

            var results = p3.Pipe(p4).Run();
        }
예제 #2
0
        public void TestWye()
        {
            var stopAfter30 = Process.Delay(3000);
            var count       = DelayCount(1);
            var combined    = Process.Wye(count, stopAfter30);
            var sink        = Process.Sink <IEither <int, Unit> >(either => Console.WriteLine(either));
            var result      = combined.Pipe(sink);

            result.Run();
        }