intersperseWith method

  1. @override
Iter<T> intersperseWith(
  1. T f()
)

Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. The closure will be called each time to generate the separator.

Implementation

@override
@pragma("vm:prefer-inline")
Iter<T> intersperseWith(T Function() f) {
  return Iter.fromIterable(_intersperseWithHelper(f));
}