Skip to content

Instantly share code, notes, and snippets.

@m-x-k
Created January 21, 2017 20:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save m-x-k/6e8272de5ccb153f797db9eb5c0227df to your computer and use it in GitHub Desktop.
Save m-x-k/6e8272de5ccb153f797db9eb5c0227df to your computer and use it in GitHub Desktop.
reactive observable operators example
from rx import Observable, Observer
letters = Observable.from_(['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon']) \
.map(lambda s: len(s)) \
.filter(lambda i: i >= 5) \
.subscribe(lambda i: print(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment