Skip to content

Instantly share code, notes, and snippets.

@jocoone
Last active February 27, 2016 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jocoone/18c3db9f5e990e676a69 to your computer and use it in GitHub Desktop.
Save jocoone/18c3db9f5e990e676a69 to your computer and use it in GitHub Desktop.
Rx.Observable.range(0, 10) //representing the pipeline
.filter(drop => drop % 2 === 0)
.map(drop => drop + 2)
.sum() // as in putting water in a bucket
.subscribe((bucket) => console.log(bucket)); // 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment