def serve.stream.parts
bend-kit-http@0.38.2.0 · http.bend:6555
import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
6555def serve.stream.parts(~S: Type, ~piece: S -> Bytes.Bytes -> IO(S & Bool), xs: List<&1, Bytes.Bytes>, st: S & Bool) -> IO(S & Bool):
6556 match xs:
6557 case Nil{}:
6558 IO.pure(S & Bool, st)
6559 case Con{b, rest}:
6560 (state, drop) = st
6561 do IO<S & Bool>:
6562 next : S & Bool <- serve.stream.one(~S, ~piece, drop, state, b)
6563 serve.stream.parts(~S, ~piece, rest, next)