take - richardszalay/raix GitHub Wiki
ο»ΏEmits a set number or values from the start of the source sequence before completing.
function take(count : uint) : IObservable.<T>The returned sequence completes when the source sequence completes or when count values have been emitted.
The returned sequence errors when the source sequences errors
x = count
xs ββoββoβββββo
1 2 ... n
β β β
ys ββoββoβββββo/IObservable.<T>
Observable.range(0, 5)
.take(3)
.subscribe(function(value : int) : void
{
trace(value);
});
// Trace output is:
// 0
// 1
// 2