import rx import rx.operators as ops numbers = rx.from_([1, 2, 3, 4, 5, 6]) numbers.pipe(ops.element_at(3)).subscribe( on_next=lambda i: print("on_next {}".format(i)), on_error=lambda e: print("on_error: {}".format(e)), on_completed=lambda: print("on_completed"))
op.min() op.reduce() op.sum() """Transformation""" op.buffer() op.group_by() op.map() op.scan() # ... """Filtering""" op.debounce() op.distinct() op.filter() op.element_at() op.first() op.ignore_elements() op.last() op.skip() op.skip_last() op.take() op.take_last() # ... """Error Handling""" op.catch() op.retry() """Utility""" op.delay()
def create(): return xs.pipe(ops.element_at(3))