danschultz / frappe

A Dart package for functional reactive programming
http://pub.dartlang.org/packages/frappe
MIT License
58 stars 13 forks source link

Add throttle() #34

Open danschultz opened 9 years ago

danschultz commented 9 years ago

Contain the last event from the source for each interval.

var stream = source.throttle(new Duration(seconds: 2));
stream.listen(print);

source:               abcde------abcde
source.throttled(2):  --b--d--e----b--d--e
danschultz commented 9 years ago

Depends on danschultz/stream_transformers#17.