arrayWindows method

Iter<Arr<T>> arrayWindows(
  1. int size
)

Returns an iterator over all contiguous windows of length size. The windows overlap. If the array is shorter than size, the iterator returns no values. Panics if size is zero or less.

Implementation

Iter<Arr<T>> arrayWindows(int size) {
  if (size <= 0) {
    panic("window size must be non-zero");
  }
  return Iter.fromIterable(_arrayWindowsHelper(size));
}