static filter(iterable, filter) {
    const out = [];
    for (const x of iterable) {
      if (filter(x)) {
        out.push(x);
      }
    }
    return out;
  }
Iterate over an iterable object and return only the items that |filter|
returns true for.

@param {!Iterable<T>} iterable
@param {function(T):boolean} filter
@return {!Array<T>}
@template T