def create(): def predicate(x): n[0] += 1 if n[0] < 3: return True else: raise Exception(ex) return xs.pipe(ops.while_do(predicate))
def create(): def predicate(x): n[0] += 1 return n[0] < 100 def subscribe(o, scheduler=None): o.on_next(1) o.on_completed() return lambda: None return reactivex.create(subscribe).pipe(ops.while_do(predicate))
def do_while(source: Observable[_T]) -> Observable[_T]: return source.pipe(ops.concat(source.pipe( ops.while_do(condition), ), ))
def create(): return xs.pipe(ops.while_do(lambda _: True))
def create(): def predicate(x): n[0] += 1 return n[0] < 3 return xs.pipe(ops.while_do(predicate))