def text
import snap@1.4.0.0/src/answer.bend as Answerimport Base
32# what the program printed, stdout and stderr together: the answer after its
33# first newline, or nothing when it has none. The body is returned as it
34# stands, never walked.
35def text(out: String) -> String:
36 match out:
37 case SNil{}:
38 SNil{}
39 case SCon{ch, +tail}:
40 text.at(Char.is_eq(ch, '\n'), tail, _u => text(tail))