function partition(array, predicate) {
  return array.reduce(
    (result, value) => {
      result[predicate(value) ? 0 : 1].push(value);
      return result;
    },
    [[], []]
  );
}
function partitionRecord(obj, predicate) {
  return Object.entries(obj).reduce(
    (result, [key, value]) => {
      result[predicate(value) ? 0 : 1][key] = value;
      return result;
    },
    [{}, {}]
  );
}
export {
  partition,
  partitionRecord
};
//# sourceMappingURL=partition.js.map