Enumerable<T>.from constructor

Enumerable<T>.from(Iterable<T> iterable)

Creates an enumerable from an Iterable.

Creates an enumerable that wraps around an Iterable with existing values. This is usually unnecessary to call, as calling the global function E achieves the same thing more concisely.

Implementation

factory Enumerable.from(Iterable<T> iterable) {
  ArgumentError.checkNotNull(iterable);
  return ValueEnumerable.create<T>(iterable);
}