Goes through the values in the iterator. Calls f for each these and if any of
them returns false this returns false (without checking the rest). If all
return true this will return true.
The function to call for
every element. This function
takes 3 arguments (the element, undefined, and the iterator) and should
return a boolean. If the return value is true the element will be
included in the returned iteror. If it is false the element is not
included.
opt_obj: T=
The object to be used as the value of 'this' within
f.
Returns
A new iterator in which only elements that
passed the test are present.
The iterator to iterate
over. If the iterable is an object toIterator will be called on
it.
f: function(this: T, ?, ?, ?): ?
The function to call for every
element. This function
takes 3 arguments (the element, undefined, and the iterator) and the
return value is irrelevant. The reason for passing undefined as the
second argument is so that the same function can be used in
goog.array#forEach as well as others.
opt_obj: T=
The object to be used as the value of 'this' within
f.
Cartesian product of zero or more sets. Gives an iterator that gives every
combination of one element chosen from each set. For example,
([1, 2], [3, 4]) gives ([1, 3], [1, 4], [2, 3], [2, 4]).
The stop value if only one argument is provided.
The start value if 2 or more arguments are provided. If only one
argument is used the start value is 0.
The function to call for every
element. This function takes 2 arguments (the function's previous result
or the initial value, and the value of the current element).
function(previousValue, currentElement) : newValue.
val: V
The initial value to pass into the function on the first call.
opt_obj: T=
The object to be used as the value of 'this'
within f.
Returns
Result of evaluating f repeatedly across the values of
the iterator.
Goes through the values in the iterator. Calls f for each these and if any of
them returns true, this returns true (without checking the rest). If all
return false this will return false.
If the object is an iterator it
will be returned as is. If the object has a __iterator__ method
that will be called to get the value iterator. If the object is an
array-like object we create an iterator for that.
Returns
An iterator that knows how to iterate over the
values in iterable.