title: Cancel a delay if same observable emits
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const observable = new rxjs.BehaviorSubject(0);
  
  observable.subscribe(v =&gt; console.log(v));
  
  rxjs
    .of(1)
    .pipe(rxjs.operators.delay(500))
    .subscribe(v =&gt; observable.next(v));
    
  observable.next(2);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.5.1/rxjs.umd.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>As you can see, the observable above emits 3 values in order : 0, 2, 1. </p>
  
  <p>Would it be possible to cancel (or ignore) the value "1" when the value "2" is emitted ? (Without closing the subscription)</p>