apply(source, fn) {
    return {
      byKey: source.keys.reduce((acc, key) => {
        acc[key] = fn(source.byKey[key], key);
        return acc;
      }, {}),
      keys: source.keys
    };
  }
Apply given function to all entities and return new map with results.

@param {object} source
@param {function} fn
@return {object}