Open
Description
schema Builder:
statements: [str] = []
add: (str) = lambda v: str {
stmts = statements + [v]
Builder{statements = stmts}
}
build: () = lambda {
" ".join(statements)
}
test = lambda {
b = Builder{}
b = b.add("hello")
b = b.add("world")
b = b.add("!")
b.build()
}
out = test()
output:
out: hello hello