repeat<T> function

Iterable<T> repeat<T>(
  1. T object,
  2. [int? count]
)

Implementation

Iterable<T> repeat<T>(T object, [int? count]) sync* {
  while (count == null || count >= 0) {
    yield object;
  }
}