fastStride method
Returns an Iterable<E>
which iterates this
using a custom stepSize
and starting from startIndex
.
- If
startIndex
is a valid index then the first element of the iterable will be:elementAt(startIndex)
. - The parameter
stepSize
must not be zero. - This method does not check for concurrent modification.
- Should be used with fixed length or immutable iterables.
Implementation
Iterable<E> fastStride(int stepSize, [int startIndex = 0]) {
if (stepSize == 0) {
_throwError<E>();
}
return stepSize > 0
? _FastStrideIterable<E>(this, stepSize, startIndex)
: _ReverseFastStrideIterable(this, stepSize, startIndex);
}