Skip to content

Instantly share code, notes, and snippets.

@m-x-k
Created January 21, 2017 17:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save m-x-k/ada594bb5bb279bc4819d276bcf69112 to your computer and use it in GitHub Desktop.
Save m-x-k/ada594bb5bb279bc4819d276bcf69112 to your computer and use it in GitHub Desktop.
Reactive for python. Simple example using lambda's
from rx import Observable, Observer
letters = Observable.from_(['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon'])
letters.subscribe(on_next=lambda s: print(s),
on_completed=lambda: print('Done'),
on_error=lambda e: print(e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment