def stream.finish

bend-kit-http@0.38.5.0 · http.bend:4796

import bend-kit-http@0.38.5.0/http.bend as Http
import Base
import bend-kit-zlib@0.5.1.0/zlib.bend as Zlib

4796def stream.finish(decs: List<&1, Zlib.Decoder>) -> IO(Bool):
4797  match decs:
4798    case Nil{}:
4799      IO.pure(Bool, True{})
4800    case Con{d, rest}:
4801      do IO<Bool>:
4802        r : Result<&1, &1, U32 & String, Unit> <- Zlib.dec.finish(d)
4803        tail : Bool <- stream.finish(rest)
4804        return Bool.and(stream.finish.ok(r), tail)

Uses (14)

Used by (3)