def has_no_capital
import bend-lint-rules@0.2.0.0/layout/case.bend as Caseimport Base
43def has_no_capital(s: String, ok: Bool) -> Bool:
44 match s ok:
45 case _ False{}:
46 False{}
47 case SNil{} True{}:
48 True{}
49 case SCon{c, rest} True{}:
50 has_no_capital(rest, Bool.not(Char.is_upper(c)))