예제 #1
0
        def create():
            def mapper(_xs):
                return _xs.pipe(
                    ops.zip(_xs.pipe(ops.skip(1))),
                    ops.map(sum),
                )

            return xs.pipe(ops.publish_value(1979, mapper))
예제 #2
0
 def test_publish_with_initial_value_multiple_connections(self):
     xs = reactivex.never()
     ys = xs.pipe(ops.publish_value(1979))
     connection1 = ys.connect()
     connection2 = ys.connect()
     assert connection1 == connection2
     connection1.dispose()
     connection2.dispose()
     connection3 = ys.connect()
     assert connection1 != connection3
예제 #3
0
 def action0(scheduler, state):
     ys[0] = xs.pipe(ops.publish_value(1979))