def int.text
import ezmcp@0.1.0.0/src/openapi.bend as Openapiimport Base
1309# whether a number's text is an integer: an optional `-`, then digits
1310def int.text(text: String) -> Bool:
1311 match text:
1312 case SNil{}:
1313 False{}
1314 case SCon{'-', +rest}:
1315 Bool.and(Bool.not(String.is_empty(rest)), digits(rest))
1316 case SCon{ch, rest}:
1317 digits(SCon{ch, rest})