def Text.joined
import bend-trace-context@0.2.0.0/trace_context.bend as TraceContextimport Base
3339# The fields joined by commas into one value, as String.join(fields, ",")
3340# writes it. It is built by loops, so fields of any length need no deep
3341# stack.
3342def Text.joined(fields: List<&2, String>) -> String:
3343 match fields:
3344 case Nil{}:
3345 SNil{}
3346 case Con{field, rest}:
3347 String.reverse(Text.joined.go(rest, String.reverse.go(field, SNil{})))