Sse.loop: def of bend-kit-llm@0.13.0.1 Import: import bend-kit-llm@0.13.0.1/sse.bend as Sse Lines 252-264 of bend-kit-llm@0.13.0.1/sse.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-llm@0.13.0.1/sse.bend&start_line=252&end_line=264 import Base # f: at least the lines left, plus one. def loop(f: Nat, l: Line, +len: U32) -> Reader & Next: match f: case 0n: stop(l, len) case 1n+p: match l: case LMore{a, +pos, cr, st}: loop(p, line(a, len, pos, pos, cr, st), len) case LWant{a, +pos, cr, st}: stop(LWant{a, pos, cr, st}, len) case LGot{a, +pos, cr, st, e}: stop(LGot{a, pos, cr, st, e}, len) Uses (8): 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/sse.bend&name=Line https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/sse.bend&name=Next https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/sse.bend&name=Reader https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/sse.bend&name=line https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/sse.bend&name=stop