Skip to content

Instantly share code, notes, and snippets.

@jocoone
Created February 27, 2016 14:51
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/39f18b926c37aede4a12 to your computer and use it in GitHub Desktop.
Save jocoone/39f18b926c37aede4a12 to your computer and use it in GitHub Desktop.
var pipeline1 = Rx.Observable.interval(500); // sends a waterdrop every 0,5s
var pipeline2 = Rx.Observable.interval(1000); // sends a waterdrop every second
pipeline1
.merge(pipeline2)
.filter(drop => drop % 2 === 0)
.map(drop => drop + 100)
.forEach(d => console.log(d));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment