reactiveIterable<E> function

Iterable<E> reactiveIterable<E>(
  1. Iterable<E> iterable
)

Creates a reactive iterable from the given iterable.

If iterable is already reactive, it is returned as-is. Otherwise, a new reactive Iterable is created from the raw value.

E is the type of elements in the iterable.

Implementation

Iterable<E> reactiveIterable<E>(Iterable<E> iterable) {
  if (impl.isReactive(iterable)) {
    return iterable;
  }

  return impl.ReactiveIterable<E>(impl.toRaw(iterable));
}