Http.hs.scan: def of bend-kit-http@0.38.4.0 Import: import bend-kit-http@0.38.4.0/http.bend as Http Lines 1321-1335 of bend-kit-http@0.38.4.0/http.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http@0.38.4.0/http.bend&start_line=1321&end_line=1335 import Base # Each step ends the scan or passes one interim head, and at most 8 interim heads pass. def hs.scan(fuel: Nat, +head: Bool, st: Hs) -> Hs: match fuel: case 0n: match st: case HsSeek{buf, from, k}: HsBad{} case HsWait{buf, k}: HsWait{buf, k} case HsBad{}: HsBad{} case HsRes{res, rb, rest}: HsRes{res, rb, rest} case 1n+f: hs.scan(f, head, hs.step(head, st)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.4.0/http.bend&name=Hs https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.4.0/http.bend&name=hs.step