code: function asyncAnd(rules) {
    if (rules.length === 0) {
      return {isValid: true, error: {}}
    }
    let {name, result: pResult} = rules[0]
    return pResult.then((result) => {
      if (!isResultValid(result)) {
        return {isValid: false, error: {reason: result, rule: name}}
      } else {
        return asyncAnd(rules.slice(1))
      }
    })
  }
docs: TODO why works this not? (bug in next?) async function asyncAnd(rules) { for (let {name, pResult} of rules) { let result = await pResult if (!isResultValid(result)) { return {isValid: false, error: {reason: result, rule: name}} } } return {isValid: true, error: {}} }