title: Get N last objects emitted by observable in RxJava2
body: <p>I have a Observables which emits some numbers and I simply want to take last N elements. </p>
  
  <p>I have following code (I'm using RxKotlin which is simply a wrapper on RxJava):</p>
  
  <pre><code>val list = listOf(1,2,3,4,5,6,7,8,9,10)
  Observable.fromIterable(list)
            .buffer(3, 1)
            .lastOrError()
            .subscribe{value -&gt; println(value)}
  </code></pre>
  
  <p>Unfortunately the result is <code>[10]</code>, as I looked closer what the buffer operator returns, I saw this:</p>
  
  <pre><code>[1, 2, 3]
  [2, 3, 4]
  [3, 4, 5]
  [4, 5, 6]
  [5, 6, 7]
  [6, 7, 8]
  [7, 8, 9]
  [8, 9, 10]
  [9, 10]
  [10] 
  </code></pre>
  
  <p>is there a way to get last "full" buffer -> <code>[8, 9, 10]</code> ?</p>