def walk.hex
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport Base
1561# a chunk header: a size that is not hex ends the walk (the parse rejects it)
1562def walk.hex(+g: Nat, rest: String, +before: String, +after: String, ok: Bool,
1563 go: String -> Walk) -> Walk:
1564 match ok:
1565 case False{}:
1566 Ended{}
1567 case True{}:
1568 +n = hexlen(before)
1569 walk.size(g, rest, after, n, Nat.is_eq(n, 0n), go)