def rep.ok
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
470# Counts go up to 1000, and a repetition cannot repeat, as in RE2.
471def rep.ok(+min: U32, max: Maybe<&2, U32>) -> Bool:
472 match max:
473 case None{}:
474 U32.is_le(min, 1000)
475 case Some{+m}:
476 U32.is_le(m, 1000) && U32.is_le(min, m)