def decode.go
import ezmcp@0.1.0.0/src/line.bend as Lineimport Base
183# decode with fuel: every step takes at least one byte, so a buffer's
184# length is fuel enough
185def decode.go(fuel: Nat, bs: List<&2, U32>) -> String:
186 match fuel:
187 case 0n:
188 SNil{}
189 case 1n+f:
190 decode.step(bs, xs => decode.go(f, xs))