code: function intersection(schema, defaults, options) {
    if (kindOf(schema) !== 'array') {
      if (process.env.NODE_ENV !== 'production') {
        throw new Error(
          `Intersection structs must be defined as an array, but you passed: ${schema}`
        )
      } else {
        throw new Error(`Invalid schema: ${schema}`)
      }
    }
  
    const types = schema.map(s => any(s, undefined, options))
    const name = 'intersection'
    const type = types.map(t => t.type).join(' & ')
    const validate = (value = resolveDefaults(defaults)) => {
      let v = value
  
      for (const t of types) {
        const [e, r] = t.validate(v)
  
        if (e) {
          e.type = type
          return [e]
        }
  
        v = r
      }
  
      return [undefined, v]
    }
  
    return new Kind(name, type, validate)
  }
docs: Intersection.
  
  @param {Array} schema
  @param {Any} defaults
  @param {Object} options