Fmt.Fmt.format.go: def of bend-kit-fmt@0.1.0.0 Import: import bend-kit-fmt@0.1.0.0/fmt.bend as Fmt Lines 98-115 of bend-kit-fmt@0.1.0.0/fmt.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&start_line=98&end_line=115 import Base # Each token eats at least one char, so fuel f is the template length. def Fmt.format.go(f: Nat, p: Tok & String, args: List<&2, String>) -> String: match f: case 0n: SNil{} case 1n+g: (tok, rest) = p match tok: case TEnd{}: SNil{} case TChr{c}: SCon{c, Fmt.format.go(g, Fmt.next(rest), args)} case THole{}: match args: case Nil{}: "{}" ++ Fmt.format.go(g, Fmt.next(rest), Nil{}) case Con{a, more}: a ++ Fmt.format.go(g, Fmt.next(rest), more) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&name=Fmt.next https://jend.leeeet.dev/definition.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&name=Tok