def Utf8.left_more

bend-trace-context@0.2.0.0 · trace_context.bend:2040

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base

2040# Fields after the first are measured with the comma that joins them. Once the
2041# budget is exceeded, no further field is visited.
2042def Utf8.left_more(fields: List<&2, String>, budget: Maybe<&2, Nat>) -> Maybe<&2, Nat>:
2043  match fields budget:
2044    case Nil{} _:
2045      budget
2046    case Con{field, rest} None{}:
2047      None{}
2048    case Con{field, rest} Some{left}:
2049      Utf8.left_more(rest, Utf8.left(field, Utf8.left(",", Some{left})))

Uses (5)

Used by (1)