filter(flags, filter) {
      const p = this;
      if (flags & ADD) p.addF = addFilter(p.addF, filter);
      if (flags & REM) p.remF = addFilter(p.remF, filter);
      if (flags & MOD$1) p.modF = addFilter(p.modF, filter);
      if (flags & SOURCE) p.srcF = addFilter(p.srcF, filter);
      return p;
    }
Adds a filter function to one more tuple sets. Filters are applied to
backing tuple arrays, to determine the actual set of tuples considered
added, removed or modified. They can be used to delay materialization of
a tuple set in order to avoid expensive array copies. In addition, the
filter functions can serve as value transformers: unlike standard predicate
function (which return boolean values), Pulse filters should return the
actual tuple value to process. If a tuple set is already filtered, the
new filter function will be appended into a conjuntive ('and') query.
@param {number} flags - Flags indicating the tuple set(s) to filter.
@param {function(*):object} filter - Filter function that will be applied
  to the tuple set array, and should return a data tuple if the value
  should be included in the tuple set, and falsy (or null) otherwise.
@return {Pulse} - Returns this pulse instance.