docs: static Matcher getPrefix(Matcher matcher) {
      if (matcher instanceof SeqMatcher) {
        List<Matcher> ms = matcher.<SeqMatcher>as().matchers();
        return ms.get(0);
      } else if (matcher instanceof ZeroOrMoreMatcher) {
        ZeroOrMoreMatcher zm = matcher.as();
        return new ZeroOrMoreMatcher(zm.repeated(), TrueMatcher.INSTANCE);
      } else if (matcher instanceof CharSeqMatcher) {
        String pattern = matcher.<CharSeqMatcher>as().pattern();
        return pattern.isEmpty() ? null : new CharSeqMatcher(pattern.charAt(0));
      } else {
        return matcher;
      }
    }