def emit_go
import cli@0.2.0.0/cli.bend as Cliimport Base
56def emit_go(segments: List<&2, Segment>, +on: Bool) -> String:
57 match segments:
58 case Nil{}:
59 ""
60 case h <> t:
61 match h:
62 case Segment{text, styles}:
63 String.append(paint(on, styles, text), emit_go(t, on))