rsplitn method

Iter<Slice<T>> rsplitn(
  1. int n,
  2. bool pred(
    1. T
    )
)

Returns an iterator over slices separated by elements that match pred, limited to returning at most n items, starting from the end. The matched element is not contained in the slices. The last element returned, if any, will contain the remainder of the slice.

Implementation

Iter<Slice<T>> rsplitn(int n, bool Function(T) pred) {
  if (n < 0) {
    panic("'n' cannot be negative");
  }
  return Iter(_rsplitnHelper(n, pred).iterator);
}