code: func LastFailed(x int, attempts []LoginAttempt) bool {
  	var failed int
  	for i := len(attempts) - 1; i >= 0; i-- {
  		if !attempts[i].Success {
  			failed++
  		} else {
  			return false
  		}
  		if failed >= x {
  			return true
  		}
  	}
  	return false
  }
docs: // LastFailed calculates last x successive attempts are failed