Bag<E>.from constructor

Bag<E>.from(
  1. Iterable<E> iterable
)

Creates a new Bag with the elements of iterable.

Implementation

Bag.from(Iterable<E> iterable)
    : _data = iterable.toList(growable: false),
      _size = iterable.length;