def serve.stream.parts
bend-kit-http@0.38.5.0 · http.bend:6547
import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
6547def serve.stream.parts(~S: Type, ~piece: S -> Bytes.Bytes -> IO(S & Bool), xs: List<&1, Bytes.Bytes>, st: S & Bool) -> IO(S & Bool):
6548 match xs:
6549 case Nil{}:
6550 IO.pure(S & Bool, st)
6551 case Con{b, rest}:
6552 (state, drop) = st
6553 do IO<S & Bool>:
6554 next : S & Bool <- serve.stream.one(~S, ~piece, drop, state, b)
6555 serve.stream.parts(~S, ~piece, rest, next)