-
Allow to create a list from an iterable
You can now build a list from any iterable object.
In the following example we use a generator to create a list of three
random numbers:function* rand() { while (true) { yield Math.random() } } const l = CowList.fromIterable(rand(), 3) const ml = MutList.fromIterable(rand(), 3)
Note that you must provide the number of items to pick from the
iterable object in the second parameter.