removeAt method

RSeq<A> removeAt(
  1. int idx
)

Implementation

RSeq<A> removeAt(int idx) {
  if (0 <= idx && idx < length) {
    if (idx == 0) {
      return tail();
    } else {
      final (a, b) = splitAt(idx);
      return a.concat(b.tail());
    }
  } else {
    throw RangeError('$idx is out of bounds (min 0, max ${length - 1})');
  }
}