fact: Definition smart_paren (s : string) : string := let fix aux s (b : bool) := match s with | EmptyString => (if b then ")" else "", b) | String a s => let (s', b) := aux s (orb b (nat_of_ascii a =? 32)%nat) in (String a s', b) end in let (s', b) := aux s false in if b then "(" ++ s' else s'.
imports: Coq(Ascii Basics Decimal List String ZArith) Ascii