code: function list(schema, defaults, options) {
    if (kindOf(schema) !== 'array' || schema.length !== 1) {
      if (process.env.NODE_ENV !== 'production') {
        throw new Error(
          `List structs must be defined as an array with a single element, but you passed: ${schema}`
        )
      } else {
        throw new Error(`Invalid schema: ${schema}`)
      }
    }
  
    const array = scalar('array', undefined, options)
    const element = any(schema[0], undefined, options)
    const name = 'list'
    const type = `[${element.type}]`
    const validate = (value = resolveDefaults(defaults)) => {
      const [error, result] = array.validate(value)
  
      if (error) {
        error.type = type
        return [error]
      }
  
      value = result
      const errors = []
      const ret = []
  
      for (let i = 0; i < value.length; i++) {
        const v = value[i]
        const [e, r] = element.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: List.
  
  @param {Array} schema
  @param {Array} defaults
  @param {Object} options