function forEach(iterator, f) {
  let result;
  while (!(result = iterator.next()).done) {
    f(result.value);
  }
}
Call a function with every value of an iterable.

Warning: this function will never halt if given an iterable that
is never exhausted.

@param {!Iterator<VALUE>} iterator
@param {function(VALUE) : *} f
@template VALUE