code: def times(p, mint, maxt=None):
      '''Repeat a parser between `mint` and `maxt` times. DO AS MUCH MATCH AS IT CAN.
      Return a list of values.'''
      maxt = maxt if maxt else mint
      @Parser
      def times_parser(text, index):
          cnt, values, res = 0, Value.success(index, []), None
          while cnt < maxt:
              res = p(text, index)
              if res.status:
                  values = values.aggregate(
                      Value.success(res.index, [res.value]))
                  index, cnt = res.index, cnt + 1
              else:
                  if cnt >= mint:
                      break
                  else:
                      return res
              if cnt >= maxt:
                  break
              if index >= len(text):
                  if cnt >= mint:
                      break
                  else:
                      r = p(text, index)
                      if index != r.index:
                          return Value.failure(index, "already meets the end, no enough text")
          return values
      return times_parser