followedByOne<T> function

Iterable<T> followedByOne<T>(
  1. Iterable<T> ts,
  2. T value
)

Adds value to the end of ts.

Implementation

Iterable<T> followedByOne<T>(Iterable<T> ts, T value) sync* {
  for (final T item in ts) {
    yield item;
  }
  yield value;
}