Skip to content
richardszalay edited this page May 20, 2011 · 8 revisions

Ignores a set number of values from the end of the source sequence

function skipLast(count : uint) : IObservable.<T>

Remarks

The returned sequence completes when the source sequence completes.

The returned sequence errors when the source sequences errors

Marble Diagrams

xs  ──o──o──o──o──/
      0  1  2  3  │
                  │
ys  ──────────────o─o─o─/
                  0 1 2

Return Value

IObservable.<T>

Examples

Observable.range(0, 5)
    .skipLast(3)
    .subscribe(function(value : int) : void
    {
        trace(value);
    });

    // Trace output is:
    // 0
    // 1
Clone this wiki locally