code: function tuple(schema, defaults, options) {
    if (kindOf(schema) !== 'array') {
      if (process.env.NODE_ENV !== 'production') {
        throw new Error(
          `Tuple structs must be defined as an array, but you passed: ${schema}`
        )
      } else {
        throw new Error(`Invalid schema: ${schema}`)
      }
    }
  
    const kinds = schema.map(s => any(s, undefined, options))
    const array = scalar('array', undefined, options)
    const name = 'tuple'
    const type = `[${kinds.map(k => k.type).join()}]`
    const validate = (value = resolveDefaults(defaults)) => {
      const [error] = array.validate(value)
  
      if (error) {
        error.type = type
        return [error]
      }
  
      const ret = []
      const errors = []
      const length = Math.max(value.length, kinds.length)
  
      for (let i = 0; i < length; i++) {
        const kind = kinds[i]
        const v = value[i]
  
        if (!kind) {
          const e = { data: value, path: [i], value: v }
          errors.push(e)
          continue
        }
  
        const [e, r] = kind.validate(v)
  
        if (e) {
          const allE = e.errors || [e]
          allE.forEach(singleE => {
            singleE.path = [i].concat(singleE.path)
            singleE.data = value
            errors.push(singleE)
          })
          continue
        }
  
        ret[i] = r
      }
  
      if (errors.length) {
        const first = errors[0]
        first.errors = errors
        return [first]
      }
  
      return [undefined, ret]
    }
  
    return new Kind(name, type, validate)
  }
docs: Tuple.
  
  @param {Array} schema
  @param {Array} defaults
  @param {Object} options