function inScope(scopes, id) {
  let index = scopes.length

  while (index--) {
    const scope = scopes[index]

    if (scope.defined.includes(id)) {
      return true
    }
  }

  return false
}
@param {Array<Scope>} scopes
  Scope.
@param {string} id
  Identifier.
@returns {boolean}
  Whether `id` is in `scope`.