skip
Returns a lazy iterable that skips the first length values.
Iterable<A> skip<A>(int length, Iterable<A> iterable)
FxAsyncIterable<A> skipAsync<A>(int length, FxAsyncIterable<A> iterable)
Fx<T> Fx.skip(int count) // chain
FxAsync<T> FxAsync.skip(int count)
Iterable<A> drop<A>(...) // FxTS alias
FxEvents<T> FxEvents<T>.drop(int count) / .skip(int count) // chain (events)
Lecture
skip is take's opposite: it discards the first
length values and yields everything after them. It's still
lazy — nothing is skipped until the pipeline is actually pulled — and it
works fine on infinite sources, since it only needs to count off a fixed
number of elements before passing the rest straight through.
skip is the Dart-idiomatic name, matching Dart's own
Iterable.skip (FxDart's Fx already extends
Iterable); fxdart also accepts the FxTS spelling
drop — they're the same operator.
Demo 1 · Basics
Demo 2 · Async, with concurrency
Try it yourself
Exercise: skip the first 2 header lines.