I am looking an operator to debounce
a series of event, let us say user's click. The input and output should be like this:
interval : -> <- -> <-
in : 1--2--3-------4--5--5--6-7-8--------
out : 1-------------4---------------------
The idea is like underscore's debounce with immediate
option on
http://underscorejs.org/#debounce. The operator can be presented/implemented in any language that supports Reactive Extensions
Edit: Clarify the interval, let say 5 seconds (5 spaces between two arrows) : -> <-
Edit2: A more understandable version: I have a user, he clicks repeatedly a button (1, 2, 3); I want to catch the first click
(1) and ignore the rest. After a while, he is tired and rest for 7 seconds (which is longer than the 5 seconds interval between two arrows) and continue clicking the button again (4, 5, 6, 7, 8) I want to catch the first click
(4) and ignore the rest.
If he clicks after the forth arrow, I want to catch that click, too.
Edit3: Here is an image which can be found at the original article