operator << method

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

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

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
        ? {}
        : skip(count).toSet();