Skip to content

Instantly share code, notes, and snippets.

@bnayae
Created May 27, 2018 11:44
Show Gist options
  • Save bnayae/001774010451bd590eef94c8fb829940 to your computer and use it in GitHub Desktop.
Save bnayae/001774010451bd590eef94c8fb829940 to your computer and use it in GitHub Desktop.
using System.Reactive.Observable.Aliases;
// filter will invoke where
Observable.Range(0, 10).Filter(i => i % 2 == 0);
Observable.Range(0, 10).Where(i => i % 2 == 0);
// map will invoke select
Observable.Range(0, 10).Map(i => $"- {i} -");
Observable.Range(0, 10).Select(i => $"- {i} -");
// flat-map will invoke select-many
Observable.Range(0, 10).FlatMap(i => Observable.Range(i, 3));
Observable.Range(0, 10).SelectMany(i => Observable.Range(i, 3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment