Created
January 21, 2017 17:42
-
-
Save m-x-k/ada594bb5bb279bc4819d276bcf69112 to your computer and use it in GitHub Desktop.
Reactive for python. Simple example using lambda's
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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