inc method

Set<N> inc([
  1. N? incrementAmount
])

Increment all values by incrementAmount.

1, 2, 3.inc() returns 2, 3, 4. 1, 2, 3.inc(2) returns 3, 4, 5. 1, 2, 3.inc(-2) returns -1, 0, 1.

incrementAmount can be positive or negative.

Implementation

Set<N> inc([N? incrementAmount]) {
  return h
      .incrementIterable(
        original: this,
        increment: incrementAmount,
      )
      .toSet();
}