src/utils/partition.js/partition
function partition(array, predicate) {
  /** @type {[Array<Element>, Array<Element>]} */
  const result = [[], []];

  for (const value of array) {
    result[predicate(value) ? 0 : 1].push(value);
  }

  return result;
}