function map(values) {
    /** @type {string} */
    let key

    for (key in values) {
      if (Object.hasOwn(values, key)) {
        const result = visit(values[key], callback)
        if (result === false) {
          delete values[key]
        }
      }
    }
  }
@param {Record<string, Rule>} values
  Map of rules to visit.