operator >> method

Set<E> operator >>(
  1. int count
)

Returns an Set that has been removed by the number of count from the end.

If count is negative it throws ArgumentError.

It is not in the Kotlin collection library. But I added it because it looks useful.

Implementation

Set<E> operator >>(int count) => count.isNegative
    ? throw ArgumentError.value(count, 'count', 'Cannot be negative')
    : count > length
        ? {}
        : take(length - count).toSet();