All

See also

  • Official ReactiveX documentation: All
Observable.all(predicate)

Determines whether all elements of an observable sequence satisfy a condition.

Example:

res = source.all(lambda value: value.length > 3)
Keyword Arguments:
 predicate (bool) – A function to test each element for a condition.
Returns:An observable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate.
Return type:Observable
../../_images/all.png
>>> import rx
>>> source = rx.Observable.of(1,2,3,4,5).all(lambda x: x < 6)
>>> subscription = source.subscribe(
...     lambda value: print("Next:", value),
...     lambda error: print("Error:", error),
...     lambda: print("Complete!")
Next: True
Complete!
Observable.every()

Alias for Observable.all().

../../_images/every.png
>>> import rx
>>> source = rx.Observable.of(1,2,3,4,5).every(lambda x: x < 6)
>>> subscription = source.subscribe(
...     lambda value: print("Next:", value),
...     lambda error: print("Error:", error),
...     lambda: print("Complete!")
Next: True
Complete!